Skip to content

Commit

Permalink
Fix version not being set in Docker container
Browse files Browse the repository at this point in the history
This was caused by using a separate build command for the container.
It has been fixed by simply using the magefile.go build command,
which produces a platform-specific binary.
  • Loading branch information
wrouesnel committed Aug 8, 2022
1 parent a61ba28 commit cccfed1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ EXPOSE 9115
COPY ./ /workdir/
WORKDIR /workdir

RUN CGO_ENABLED=0 \
go build -a -o poller_exporter \
-trimpath -ldflags '-buildid= -extldflags "-static"' \
./cmd/poller_exporter
RUN go run mage.go binary

FROM scratch

Expand Down

0 comments on commit cccfed1

Please sign in to comment.