Files
realDynDNS/Dockerfile
Timo Behrendt ad20ad46b0
All checks were successful
CD / test (push) Successful in 2m26s
CD / Build and push (amd64) (push) Successful in 1m37s
CD / Build and push (arm64) (push) Successful in 3m54s
CD / Create manifest (push) Successful in 11s
chore: slimmer docker base image & binary (#29)
Reduction of 352 MiB -> 8.22 MiB

Reviewed-on: #29
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-02-16 20:27:29 +01:00

15 lines
298 B
Docker

FROM golang:1.23-alpine as build
ARG GOARCH=amd64
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} \
go build -trimpath -ldflags="-s -w" -o main .
FROM gcr.io/distroless/static-debian12
COPY --from=build /app/main /
CMD ["/main"]