Skip to content

Commit

Permalink
Multi-platform dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpherrinm committed Nov 16, 2023
1 parent 92c9ccd commit 2374e56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/golang:1.21.4-bookworm AS build
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.21.4-bookworm AS build

WORKDIR /go/src/app

Expand All @@ -11,7 +11,7 @@ COPY *.go .

ENV CGO_ENABLED=0

RUN go build -v -o /go/bin/unbound_exporter ./...
RUN GOOS=$TARGETOS GOARCH=$TARGETPLATFORM go build -v -o /go/bin/unbound_exporter ./...

FROM gcr.io/distroless/static-debian12

Expand Down

0 comments on commit 2374e56

Please sign in to comment.