Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fixing references in Dockerfile (PROJQUAY-8087) #2154

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN --mount=type=bind,target=. \
--mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg/mod \
--network=none \
<<.
bash <<.
set -e
export GOOS="$TARGETOS" GOARCH="$TARGETARCH" GOBIN=/out/bin
if [ -n "$TARGETVARIANT" ]; then
Expand All @@ -45,19 +45,19 @@ fi
if [ -n "${CLAIR_VERSION}" ]; then
vstr="${CLAIR_VERSION} (user)"
cat <<msg >&2
Setting reported version to "${vstr}".
Setting reported version to "\${vstr}".

This hook into the go build process is not needed if building using a prepared
source archive and will go away in the future.

Please open an issue if this would prevent a desired use-case.
msg
varg=" -X 'github.com/quay/clair/v4/cmd.Version=${vstr}'"
varg=" -X 'github.com/quay/clair/v4/cmd.Version=\${vstr}'"
fi
install -d "${GOBIN}"
install -d "\${GOBIN}"
go build \
-ldflags="-s -w$varg" -trimpath \
-o "${GOBIN}" \
-ldflags="-s -w\$varg" -trimpath \
-o "\${GOBIN}" \
./cmd/...
.

Expand Down
Loading