mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 04:05:40 +01:00
Merge pull request #11634 from heww/bump-up-clair-adapter
chore(clair): bump up clair adapter version to 1.0.2
This commit is contained in:
commit
9fe893af91
2
Makefile
2
Makefile
@ -102,7 +102,7 @@ REGISTRYVERSION=v2.7.1-patch-2819-2553
|
|||||||
NOTARYVERSION=v0.6.1
|
NOTARYVERSION=v0.6.1
|
||||||
CLAIRVERSION=v2.1.1
|
CLAIRVERSION=v2.1.1
|
||||||
NOTARYMIGRATEVERSION=v3.5.4
|
NOTARYMIGRATEVERSION=v3.5.4
|
||||||
CLAIRADAPTERVERSION=v1.0.1
|
CLAIRADAPTERVERSION=v1.0.2
|
||||||
TRIVYVERSION=v0.5.4
|
TRIVYVERSION=v0.5.4
|
||||||
TRIVYADAPTERVERSION=v0.8.0
|
TRIVYADAPTERVERSION=v0.8.0
|
||||||
|
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
FROM golang:1.13.8
|
FROM golang:1.13.8
|
||||||
|
|
||||||
|
ARG VERSION
|
||||||
|
ARG COMMIT
|
||||||
|
|
||||||
ADD . /go/src/github.com/goharbor/harbor-scanner-clair/
|
ADD . /go/src/github.com/goharbor/harbor-scanner-clair/
|
||||||
WORKDIR /go/src/github.com/goharbor/harbor-scanner-clair/
|
WORKDIR /go/src/github.com/goharbor/harbor-scanner-clair/
|
||||||
|
|
||||||
RUN export GOFLAGS=-mod=vendor GOOS=linux GO111MODULE=on CGO_ENABLED=0 && \
|
RUN export GOFLAGS=-mod=vendor GOOS=linux GO111MODULE=on CGO_ENABLED=0 && \
|
||||||
go build -o harbor-scanner-clair cmd/harbor-scanner-clair/main.go
|
go build -ldflags "-X main.version=$VERSION -X main.commit=$COMMIT -X main.date=`date -u --iso-8601=seconds`" \
|
||||||
|
-o harbor-scanner-clair cmd/harbor-scanner-clair/main.go
|
||||||
|
@ -21,11 +21,11 @@ cur=$PWD
|
|||||||
# The temporary directory to clone Clair adapter source code
|
# The temporary directory to clone Clair adapter source code
|
||||||
TEMP=$(mktemp -d ${TMPDIR-/tmp}/clair-adapter.XXXXXX)
|
TEMP=$(mktemp -d ${TMPDIR-/tmp}/clair-adapter.XXXXXX)
|
||||||
git clone https://github.com/goharbor/harbor-scanner-clair.git $TEMP
|
git clone https://github.com/goharbor/harbor-scanner-clair.git $TEMP
|
||||||
cd $TEMP; git checkout $VERSION; cd -
|
cd $TEMP; git checkout $VERSION; export COMMIT=$(git rev-list -1 HEAD); cd -
|
||||||
|
|
||||||
echo "Building Clair adapter binary based on golang:1.13.8..."
|
echo "Building Clair adapter binary based on golang:1.13.8..."
|
||||||
cp Dockerfile.binary $TEMP
|
cp Dockerfile.binary $TEMP
|
||||||
docker build -f $TEMP/Dockerfile.binary -t clair-adapter-golang $TEMP
|
docker build --build-arg VERSION=${VERSION} --build-arg COMMIT=${COMMIT} -f $TEMP/Dockerfile.binary -t clair-adapter-golang $TEMP
|
||||||
|
|
||||||
echo "Copying Clair adapter binary from the container to the local directory..."
|
echo "Copying Clair adapter binary from the container to the local directory..."
|
||||||
ID=$(docker create clair-adapter-golang)
|
ID=$(docker create clair-adapter-golang)
|
||||||
|
Loading…
Reference in New Issue
Block a user