-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
32 lines (22 loc) · 1.05 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
FROM caddy:2.9.1-builder AS builder
RUN git clone https://github.com/zyclonite/caddy-route53 /src/route53 && \
git clone https://github.com/zyclonite/caddy-forwardproxy /src/forwardproxy
RUN xcaddy build \
--with github.com/caddy-dns/route53=/src/route53 \
--with github.com/caddyserver/forwardproxy=/src/forwardproxy
FROM alpine:3.20
LABEL org.opencontainers.image.title="caddy" \
org.opencontainers.image.version="2.9.1" \
org.opencontainers.image.description="Custom Caddyserver as Docker Image" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.source="https://github.com/zyclonite/caddy-docker"
ENV XDG_CONFIG_HOME /config
ENV XDG_DATA_HOME /data
RUN apk add --no-cache --purge --clean-protected -u ca-certificates mailcap \
&& mkdir -p /config/caddy /data/caddy /etc/caddy /usr/share/caddy \
&& rm -rf /var/cache/apk/*
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
EXPOSE 80 443 2019
WORKDIR /srv
ENTRYPOINT ["caddy"]
CMD ["run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]