-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (43 loc) · 1.89 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM ubuntu:xenial AS builder
RUN apt-get update && apt-get install -y \
git \
wget \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /dehydrated
RUN git clone --depth=1 https://github.com/lukas2511/dehydrated . && mkdir hooks && git clone --depth=1 https://github.com/whereisaaron/dehydrated-route53-hook-script hooks/route53
ENV DOCKERIZE_VERSION v0.5.0
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
ENV GOSU_VERSION 1.10
RUN set -ex; \
fetchDeps=' \
ca-certificates \
wget \
'; \
apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \
rm -rf /var/lib/apt/lists/*; \
dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; \
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc; \
chmod +x /usr/local/bin/gosu; \
gosu nobody true; \
apt-get purge -y --auto-remove $fetchDeps
FROM golang:1.11.0-alpine3.8
RUN apk add --update curl libressl bash git jq && \
rm -rf /var/cache/apk/*
RUN go get github.com/barnybug/cli53/cmd/cli53
WORKDIR /dehydrated
COPY --from=builder /dehydrated /dehydrated
COPY --from=builder /usr/local/bin /usr/local/bin
COPY config.tmpl config.tmpl
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
VOLUME /dehydrated/certs
VOLUME /dehydrated/accounts
ENTRYPOINT ["/entrypoint.sh"]