We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6b1635 commit 64b64abCopy full SHA for 64b64ab
Dockerfile
@@ -19,8 +19,8 @@ WORKDIR $GOPATH/src/${PKG}
19
RUN git fetch --all --tags --prune
20
RUN git checkout tags/${TAG} -b ${TAG}
21
RUN go mod edit -replace github.com/docker/docker=github.com/docker/docker@v27.1.1+incompatible && go mod tidy && go mod vendor
22
-ENV GO_LDFLAGS="-linkmode=external -X ${PKG}/pkg/version.Version=${TAG}"
23
-RUN go-build-static.sh -gcflags=-trimpath=${GOPATH}/src -o bin/crictl ./cmd/crictl
+RUN GO_LDFLAGS="-linkmode=external -X $(awk '/^module /{print $2}' go.mod)/pkg/version.Version=${TAG}" \
+ go-build-static.sh -gcflags=-trimpath=${GOPATH}/src -o bin/crictl ./cmd/crictl
24
RUN go-assert-static.sh bin/*
25
RUN if [ "${ARCH}" = "amd64" ]; then \
26
go-assert-boring.sh bin/* ; \
0 commit comments