forked from abiosoft/caddy-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (38 loc) · 1.19 KB
/
Dockerfile
File metadata and controls
51 lines (38 loc) · 1.19 KB
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
#
# Builder
#
FROM abiosoft/caddy:builder as builder
ARG version="0.11.0"
ARG plugins="cloudflare,reauth,datadog"
RUN go get -v github.com/abiosoft/parent
RUN VERSION=${version} PLUGINS=${plugins} ENABLE_TELEMETRY=false /bin/sh /usr/bin/builder.sh
#
# Final stage
#
FROM alpine:3.7
ARG BUILD_DATE="2018-06-27"
ARG VCS_REF="5552dcb"
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="caddy" \
org.label-schema.url="https://caddyserver.com/" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/mholt/caddy" \
org.label-schema.schema-version="1.0"
ARG version="0.11.0"
LABEL caddy_version="$version"
# Let's Encrypt Agreement
ENV ACME_AGREE="false"
RUN apk add --no-cache openssh-client git
# install caddy
COPY --from=builder /install/caddy /usr/bin/caddy
# validate install
RUN /usr/bin/caddy -version
RUN /usr/bin/caddy -plugins
EXPOSE 80 443 2015
VOLUME /root/.caddy /srv
WORKDIR /srv
COPY Caddyfile /etc/Caddyfile
COPY index.html /srv/index.html
COPY --from=builder /go/bin/parent /bin/parent
ENTRYPOINT ["/bin/parent", "caddy"]
CMD ["--conf", "/etc/Caddyfile", "--log", "stdout", "--agree=$ACME_AGREE"]