mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-22 23:51:27 +01:00
Merge pull request #6184 from wy65701436/bump-up-clair
Build clair version into clair image
This commit is contained in:
commit
b58ff42dff
@ -3,4 +3,5 @@ FROM golang:1.9.2
|
|||||||
ADD . /go/src/github.com/coreos/clair/
|
ADD . /go/src/github.com/coreos/clair/
|
||||||
WORKDIR /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
|
||||||
|
@ -29,7 +29,7 @@ docker build -f $TEMP/Dockerfile.binary -t clair-golang $TEMP
|
|||||||
|
|
||||||
echo 'copy the clair binary to local...'
|
echo 'copy the clair binary to local...'
|
||||||
ID=$(docker create clair-golang)
|
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 rm -f $ID
|
||||||
docker rmi -f clair-golang
|
docker rmi -f clair-golang
|
||||||
|
Loading…
Reference in New Issue
Block a user