Skip to content

Commit

Permalink
Merge pull request #3926 from marcusirgens/use-build-tags
Browse files Browse the repository at this point in the history
Pass `BUILDTAGS` argument to `go build`
  • Loading branch information
milosgajdos committed Jun 7, 2023
2 parents 7c354a4 + ab7178c commit 8728c52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -27,7 +27,7 @@ RUN --mount=type=bind,target=/go/src/github.com/docker/distribution,rw \
--mount=type=cache,target=/root/.cache/go-build \
--mount=target=/go/pkg/mod,type=cache \
--mount=type=bind,source=/tmp/.ldflags,target=/tmp/.ldflags,from=version \
set -x ; xx-go build -trimpath -ldflags "$(cat /tmp/.ldflags) ${LDFLAGS}" -o /usr/bin/registry ./cmd/registry \
set -x ; xx-go build -trimpath -ldflags "$(cat /tmp/.ldflags) ${LDFLAGS}" -tags="${BUILDTAGS}" -o /usr/bin/registry ./cmd/registry \
&& xx-verify --static /usr/bin/registry

FROM scratch AS binary
Expand Down

0 comments on commit 8728c52

Please sign in to comment.