Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.25.5-alpine@sha256:ac09a5f469f307e5da71e766b0bd59c9c49ea460a528cc3e6686513d64a6f1fb AS builder

Check warning on line 1 in Dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use either the version tag or the digest for the image instead of both.

See more on https://sonarcloud.io/project/issues?id=version-cli_version&issues=AaAl5Qffk8iVFcdnA0Wk&open=AaAl5Qffk8iVFcdnA0Wk&pullRequest=135

WORKDIR /src/

Expand All @@ -11,10 +11,10 @@
COPY . .

RUN --mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -a -installsuffix cgo \

Check warning on line 14 in Dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Surround this variable with double quotes; otherwise, it can lead to unexpected behavior.

See more on https://sonarcloud.io/project/issues?id=version-cli_version&issues=AaAl5Qffk8iVFcdnA0Wl&open=AaAl5Qffk8iVFcdnA0Wl&pullRequest=135

Check warning on line 14 in Dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Surround this variable with double quotes; otherwise, it can lead to unexpected behavior.

See more on https://sonarcloud.io/project/issues?id=version-cli_version&issues=AaAl5Qffk8iVFcdnA0Wm&open=AaAl5Qffk8iVFcdnA0Wm&pullRequest=135
-ldflags="-X github.com/version-cli/version/cmd.VERSION=${VERSION}" -o version

FROM gcr.io/distroless/static:nonroot@sha256:2b7c93f6d6648c11f0e80a48558c8f77885eb0445213b8e69a6a0d7c89fc6ae4
FROM gcr.io/distroless/static:nonroot@sha256:1c2c046bc09ed40fad370b599a0b1ae7987f55b01e247cf27a7c27cd97e5bbc7

Check warning on line 17 in Dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use either the version tag or the digest for the image instead of both.

See more on https://sonarcloud.io/project/issues?id=version-cli_version&issues=AaAl5Qffk8iVFcdnA0Wn&open=AaAl5Qffk8iVFcdnA0Wn&pullRequest=135

COPY --from=builder /src/version /bin/version

Expand Down
Loading