Skip to content

Commit

Permalink
fix: golang build command
Browse files Browse the repository at this point in the history
  • Loading branch information
hatamiarash7 committed Jan 6, 2025
1 parent 5cf51e6 commit 322813d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARG TARGETARCH
WORKDIR /app/
ADD . .

RUN GO111MODULE=on CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-s -w" -o ipset-exporter cmd/*.go
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-s -w" -o ipset-exporter cmd/ipset-exporter/main.go

FROM --platform=${TARGETPLATFORM:-linux/amd64} scratch

Check warning on line 13 in Dockerfile

View workflow job for this annotation

GitHub Actions / 🐳 Build Docker image

Setting platform to predefined $TARGETPLATFORM in FROM is redundant as this is the default behavior

RedundantTargetPlatform: Setting platform to predefined ${TARGETPLATFORM:-linux/amd64} in FROM is redundant as this is the default behavior More info: https://docs.docker.com/go/dockerfile/rule/redundant-target-platform/

Expand Down

0 comments on commit 322813d

Please sign in to comment.