godyn/Dockerfile
Matthew Welch 1455ba5282 v1.0.0
Updated dockerfile to build the app
Update import paths
Properly handles creating the record if there is none
Ignore the GCP backend limiter if we don't have a cached record
Add a limiter for polling for external IP Addresses
2021-08-01 18:30:35 -07:00

32 lines
392 B
Docker

##
## Build
##
FROM golang:alpine AS build
ENV CGO_ENABLED=0
WORKDIR /app
COPY go.mod ./
COPY go.sum ./
COPY go-external-ip ./
RUN go mod download
COPY . ./
RUN go build ./cmd/cloud-dyndns-client
##
## Deploy
##
FROM gcr.io/distroless/base-debian10
WORKDIR /
COPY --from=build /app/cloud-dyndns-client /cloud-dyndns-client
USER nonroot:nonroot
ENTRYPOINT ["/cloud-dyndns-client"]