-
Notifications
You must be signed in to change notification settings - Fork 13
/
alpine.Dockerfile
35 lines (24 loc) · 886 Bytes
/
alpine.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
FROM golang:1.23-alpine AS server_build
WORKDIR /appbuild
ARG GOARCH
COPY go.mod go.sum /appbuild/
COPY ./ /appbuild
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/root/go/pkg/mod CGO_ENABLED=0 GOOS=linux go build -o fritzbox-cloudflare-dyndns
# Build deployable server
FROM alpine:3
ENV FRITZBOX_ENDPOINT_URL="http://fritz.box:49000" \
FRITZBOX_ENDPOINT_TIMEOUT="30s" \
DYNDNS_SERVER_BIND=":8080" \
DYNDNS_SERVER_USERNAME="" \
DYNDNS_SERVER_PASSWORD="" \
CLOUDFLARE_API_EMAIL="" \
CLOUDFLARE_API_KEY_FILE="" \
CLOUDFLARE_ZONES_IPV4="" \
CLOUDFLARE_ZONES_IPV6="" \
DEVICE_LOCAL_ADDRESS_IPV6="" \
METRICS_BIND="" \
METRICS_TOKEN_FILE=""
WORKDIR /app
COPY --from=server_build /appbuild/fritzbox-cloudflare-dyndns /app/fritzbox-cloudflare-dyndns
EXPOSE 8080
ENTRYPOINT ["./fritzbox-cloudflare-dyndns"]