-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContainerfile.aarch64
34 lines (27 loc) · 934 Bytes
/
Containerfile.aarch64
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
ARG caddyversion=2.8.4
ARG PLTF_ARCH=arm64
FROM docker.io/caddy/caddy:${caddyversion}-builder-alpine AS builder
RUN GOARCH=arm64 xcaddy build \
--with github.com/pteich/[email protected] \
--with github.com/caddy-dns/cloudflare@89f16b99c18ef49c8bb470a82f895bce01cbaece
FROM --platform=linux/${PLTF_ARCH} docker.io/library/alpine:3.20.3
LABEL maintainer "Lorenzo Prosseda <[email protected]>"
# Download environment tools
RUN apk add --no-cache \
'ca-certificates=20240705-r0'
# Create directories and get Caddy binary from builder
RUN mkdir -p \
/config/caddy \
/data/caddy \
/etc/caddy \
/usr/share/caddy
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
# Configure system
EXPOSE 80 443
VOLUME /config /data
ENV XDG_CONFIG_HOME /config
ENV XDG_DATA_HOME /data
ENV CADDYFILE_PATH=/etc/caddy/Caddyfile
WORKDIR /srv
# Run the proxy
CMD caddy run --config ${CADDYFILE_PATH} --adapter caddyfile