1
0
mirror of https://github.com/goharbor/harbor.git synced 2025-01-04 23:17:45 +01:00

Merge pull request from wy65701436/bump-up-clair

Build clair version into clair image
This commit is contained in:
James Zabala 2018-11-02 17:04:25 -04:00 committed by GitHub
commit b58ff42dff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions
make/photon/clair

View File

@ -3,4 +3,5 @@ FROM golang:1.9.2
ADD . /go/src/github.com/coreos/clair/
WORKDIR /go/src/github.com/coreos/clair/
RUN go install -v github.com/coreos/clair/cmd/clair
RUN export CLAIR_VERSION=$(git describe --tag --always --dirty) && \
go build -ldflags "-X github.com/coreos/clair/pkg/version.Version=$CLAIR_VERSION" github.com/coreos/clair/cmd/clair

View File

@ -29,7 +29,7 @@ docker build -f $TEMP/Dockerfile.binary -t clair-golang $TEMP
echo 'copy the clair binary to local...'
ID=$(docker create clair-golang)
docker cp $ID:/go/bin/clair binary
docker cp $ID:/go/src/github.com/coreos/clair/clair binary
docker rm -f $ID
docker rmi -f clair-golang