mirror of
https://github.com/letsencrypt/unbound_exporter
synced 2025-02-03 04:11:50 +00:00
Adjust dockerfile to my liking
This commit is contained in:
parent
9a89f5d0b7
commit
d19cc94bda
12
Dockerfile
12
Dockerfile
@ -1,15 +1,9 @@
|
||||
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.21.4-bookworm AS build
|
||||
|
||||
VOLUME . /go/src/app
|
||||
|
||||
WORKDIR /go/src/app
|
||||
COPY . .
|
||||
RUN go mod download
|
||||
|
||||
ENV CGO_ENABLED=0
|
||||
|
||||
RUN GOOS=$TARGETOS GOARCH=$TARGETPLATFORM go build -v -o /go/bin/unbound_exporter ./...
|
||||
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETPLATFORM go build -v -o /go/bin/unbound_exporter
|
||||
|
||||
FROM gcr.io/distroless/static-debian12
|
||||
|
||||
COPY --from=build /go/bin/unbound_exporter /
|
||||
|
||||
ENTRYPOINT ["/unbound_exporter"]
|
||||
|
Loading…
Reference in New Issue
Block a user