forked from webwurst/docker-caddy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
40 lines (30 loc) · 978 Bytes
/
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
# https://hub.docker.com/_/caddy
#
# Builder
#
FROM caddy:2.6.2-builder AS builder
# confd
RUN wget -O /usr/bin/confd \
https://github.com/kelseyhightower/confd/releases/download/v0.16.0/confd-0.16.0-linux-amd64 \
&& chmod 0755 /usr/bin/confd
# Install specific commit SHA before update of GO dependencies
# TODO: remove after upgrading to v2.7.6
RUN xcaddy build \
--with github.com/mholt/caddy-ratelimit@2dc0d586f0b87e983757c403bc0929ddeb84a537
#
# Final stage
#
FROM caddy:2.6.2
ENV ENABLE_TELEMETRY="false"
COPY Caddyfile /etc/caddy/
COPY vhosts /etc/caddy/vhosts
RUN mkdir -p /etc/caddy/roots/internet-test
RUN echo 'Connection successful! / Verbindung erfolgreich!' > /etc/caddy/roots/internet-test/index.txt
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
COPY --from=builder /usr/bin/confd /usr/bin/confd
# Copy confd files
COPY confd_files /etc/confd/
EXPOSE 80 443 8000 2020
# Not sure if we still need it
# maybe because of confd
# CMD ["./run.sh"]