You've already forked ddns-updater
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
22 lines
680 B
Docker
22 lines
680 B
Docker
FROM golang:1.22 as build
|
|
|
|
# Copy project sources
|
|
COPY . /opt/project/
|
|
WORKDIR /opt/project
|
|
|
|
# Install Pre-Requisites
|
|
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates=20230311
|
|
# Create a user
|
|
RUN useradd --no-create-home --system --shell /bin/false ddnsuser
|
|
|
|
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /cloudflare-ddns-updater
|
|
|
|
FROM scratch
|
|
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY --from=build /cloudflare-ddns-updater /cloudflare-ddns-updater
|
|
COPY --from=build /bin/false /bin/false
|
|
COPY --from=build /etc/passwd /etc/passwd
|
|
|
|
USER nobody
|
|
ENTRYPOINT ["/cloudflare-ddns-updater"]
|
|
CMD ["cloudflare-ddns-updater"] |