mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-01 08:09:59 +01:00
upgrade clair to v2.1.1
Change-Id: Idb2ad0470a51666d75895d8c5e68d80a67e05276 Signed-off-by: Ziming Zhang <zziming@vmware.com>
This commit is contained in:
parent
98d932cd57
commit
2b378899df
2
Makefile
2
Makefile
@ -99,7 +99,7 @@ PREPARE_VERSION_NAME=versions
|
||||
REGISTRYVERSION=v2.7.1-patch-2819-2553
|
||||
NGINXVERSION=$(VERSIONTAG)
|
||||
NOTARYVERSION=v0.6.1
|
||||
CLAIRVERSION=v2.1.0
|
||||
CLAIRVERSION=v2.1.1
|
||||
MIGRATORVERSION=$(VERSIONTAG)
|
||||
REDISVERSION=$(VERSIONTAG)
|
||||
NOTARYMIGRATEVERSION=v3.5.4
|
||||
|
@ -231,7 +231,7 @@ define _extract_archive
|
||||
endef
|
||||
|
||||
define _get_binary
|
||||
$(WGET) --timeout 30 --no-check-certificate $1 -O $2
|
||||
$(WGET) --timeout 30 --no-check-certificate $1 -O $2 || exit 1
|
||||
endef
|
||||
|
||||
build: _build_prepare _build_db _build_portal _build_core _build_jobservice _build_log _build_nginx _build_registry _build_registryctl _build_notary _build_clair _build_clair_adapter _build_redis _build_migrator _build_chart_server
|
||||
|
@ -1,7 +1,7 @@
|
||||
FROM golang:1.12.12
|
||||
|
||||
ADD . /go/src/github.com/coreos/clair/
|
||||
WORKDIR /go/src/github.com/coreos/clair/
|
||||
ADD . /go/src/github.com/quay/clair/
|
||||
WORKDIR /go/src/github.com/quay/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
|
||||
RUN export CLAIR_VERSION=$(git describe --tag --always --dirty) GO111MODULE=on && \
|
||||
go build -ldflags "-X github.com/quay/clair/pkg/version.Version=$CLAIR_VERSION" ./cmd/clair
|
||||
|
@ -20,8 +20,7 @@ cur=$PWD
|
||||
|
||||
# the temp folder to store distribution source code...
|
||||
TEMP=`mktemp -d /$TMPDIR/clair.XXXXXX`
|
||||
git clone https://github.com/coreos/clair.git $TEMP
|
||||
cd $TEMP; git checkout $VERSION; cd -
|
||||
git clone -b $VERSION --single-branch https://github.com/quay/clair.git $TEMP
|
||||
|
||||
echo 'build the clair binary bases on the golang:1.12.12'
|
||||
cp Dockerfile.binary $TEMP
|
||||
@ -29,7 +28,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/src/github.com/coreos/clair/clair binary
|
||||
docker cp $ID:/go/src/github.com/quay/clair/clair binary
|
||||
|
||||
docker rm -f $ID
|
||||
docker rmi -f clair-golang
|
||||
|
Loading…
Reference in New Issue
Block a user