-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (20 loc) · 760 Bytes
/
Dockerfile
File metadata and controls
26 lines (20 loc) · 760 Bytes
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
FROM golang:alpine as builder
RUN apk add -U --no-cache ca-certificates git
RUN go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
RUN CGO_ENABLED=0 xcaddy build \
--output artifacts/binaries/linux/caddy \
--with github.com/lucaslorentz/caddy-docker-proxy/plugin/v2 \
--with github.com/mholt/caddy-webdav \
--with github.com/caddy-dns/cloudflare \
--with github.com/porech/caddy-maxmind-geolocation
RUN chmod +x artifacts/binaries/linux/caddy
# Image starts here
FROM scratch
EXPOSE 80 443 2019
ENV XDG_CONFIG_HOME /config
ENV XDG_DATA_HOME /data
WORKDIR /
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /go/artifacts/binaries/linux/caddy /bin/
ENTRYPOINT ["/bin/caddy"]
CMD ["docker-proxy"]