2020-03-05 16:30:56 +01:00
|
|
|
FROM golang:1.14-alpine AS go-builder
|
2018-06-05 09:37:32 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-03-05 16:31:19 +01:00
|
|
|
FROM alpine:3.11
|
2015-12-31 18:50:25 +01:00
|
|
|
|
2017-11-22 22:55:19 +01:00
|
|
|
LABEL maintainer="Yves Blusseau <90z7oey02@sneakemail.com> (@blusseau)"
|
2015-12-31 18:50:25 +01:00
|
|
|
|
2017-11-22 22:55:19 +01:00
|
|
|
ENV DEBUG=false \
|
|
|
|
DOCKER_HOST=unix:///var/run/docker.sock
|
2016-02-26 19:07:11 +01:00
|
|
|
|
2017-11-22 22:55:19 +01:00
|
|
|
# Install packages required by the image
|
|
|
|
RUN apk add --update \
|
|
|
|
bash \
|
|
|
|
ca-certificates \
|
2018-12-14 15:01:27 +01:00
|
|
|
coreutils \
|
2017-11-22 22:55:19 +01:00
|
|
|
curl \
|
|
|
|
jq \
|
|
|
|
openssl \
|
|
|
|
&& rm /var/cache/apk/*
|
2015-12-31 18:50:25 +01:00
|
|
|
|
2018-06-05 09:37:32 +02:00
|
|
|
# Install docker-gen from build stage
|
|
|
|
COPY --from=go-builder /go/src/github.com/jwilder/docker-gen/docker-gen /usr/local/bin/
|
2015-12-31 18:50:25 +01:00
|
|
|
|
2017-11-22 22:55:19 +01:00
|
|
|
# Install simp_le
|
2015-12-31 18:50:25 +01:00
|
|
|
COPY /install_simp_le.sh /app/install_simp_le.sh
|
2018-06-05 09:37:32 +02:00
|
|
|
RUN chmod +rx /app/install_simp_le.sh \
|
|
|
|
&& sync \
|
|
|
|
&& /app/install_simp_le.sh \
|
|
|
|
&& rm -f /app/install_simp_le.sh
|
2015-12-31 18:50:25 +01:00
|
|
|
|
|
|
|
COPY /app/ /app/
|
2017-11-22 22:55:19 +01:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
ENTRYPOINT [ "/bin/bash", "/app/entrypoint.sh" ]
|
|
|
|
CMD [ "/bin/bash", "/app/start.sh" ]
|