mirror of
https://github.com/nginx-proxy/docker-letsencrypt-nginx-proxy-companion
synced 2024-11-23 00:52:02 +01:00
56 lines
1.2 KiB
Docker
56 lines
1.2 KiB
Docker
FROM golang:1.15-alpine AS go-builder
|
|
|
|
ENV DOCKER_GEN_VERSION=0.7.4
|
|
|
|
# Install build dependencies for docker-gen
|
|
RUN apk add --update \
|
|
curl \
|
|
gcc \
|
|
git \
|
|
make \
|
|
musl-dev
|
|
|
|
# Build docker-gen
|
|
RUN go get github.com/jwilder/docker-gen \
|
|
&& cd /go/src/github.com/jwilder/docker-gen \
|
|
&& git checkout $DOCKER_GEN_VERSION \
|
|
&& make get-deps \
|
|
&& make all
|
|
|
|
FROM alpine:3.12
|
|
|
|
LABEL maintainer="Yves Blusseau <90z7oey02@sneakemail.com> (@blusseau)"
|
|
|
|
ENV DOCKER_HOST=unix:///var/run/docker.sock \
|
|
PATH=$PATH:/app
|
|
|
|
# Install packages required by the image
|
|
RUN apk add --update \
|
|
bash \
|
|
coreutils \
|
|
curl \
|
|
jq \
|
|
netcat-openbsd \
|
|
openssl \
|
|
socat \
|
|
&& rm /var/cache/apk/*
|
|
|
|
# Install docker-gen from build stage
|
|
COPY --from=go-builder /go/src/github.com/jwilder/docker-gen/docker-gen /usr/local/bin/
|
|
|
|
# Install acme.sh
|
|
COPY /install_acme.sh /app/install_acme.sh
|
|
RUN chmod +rx /app/install_acme.sh \
|
|
&& sync \
|
|
&& /app/install_acme.sh \
|
|
&& rm -f /app/install_acme.sh
|
|
|
|
COPY /app/ /app/
|
|
|
|
WORKDIR /app
|
|
|
|
VOLUME ["/etc/acme.sh", "/etc/nginx/certs"]
|
|
|
|
ENTRYPOINT [ "/bin/bash", "/app/entrypoint.sh" ]
|
|
CMD [ "/bin/bash", "/app/start.sh" ]
|