From bc1969156e414af37242618819313b52f2449891 Mon Sep 17 00:00:00 2001 From: Daniel Jiang Date: Thu, 12 Jul 2018 13:59:51 +0800 Subject: [PATCH] Bump up clair to v2.0.4 This commit bump up clair to v2.0.4. The current build process is download the binary from google storage, the update of the binary in google storage is not reflected in this commit. --- Makefile | 2 +- make/photon/Makefile | 2 +- make/photon/clair/Dockerfile | 8 ++++---- make/photon/clair/Dockerfile.binary | 4 ++-- make/photon/clair/docker-entrypoint.sh | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 649b1ca2e..615feb41d 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ NGINXVERSION=$(VERSIONTAG) PHOTONVERSION=1.0 NOTARYVERSION=v0.5.1 MARIADBVERSION=$(VERSIONTAG) -CLAIRVERSION=v2.0.1 +CLAIRVERSION=v2.0.4 CLAIRDBVERSION=$(VERSIONTAG) MIGRATORVERSION=$(VERSIONTAG) REDISVERSION=$(VERSIONTAG) diff --git a/make/photon/Makefile b/make/photon/Makefile index a5dbf62e5..f85bb07fb 100644 --- a/make/photon/Makefile +++ b/make/photon/Makefile @@ -114,7 +114,7 @@ _build_clair: @if [ "$(CLAIRFLAG)" = "true" ] ; then \ if [ "$(BUILDBIN)" != "true" ] ; then \ rm -rf $(DOCKERFILEPATH_CLAIR)/binary && mkdir -p $(DOCKERFILEPATH_CLAIR)/binary && \ - $(call _get_binary, https://storage.googleapis.com/harbor-builds/bin/clair-fix-ubuntu-url, $(DOCKERFILEPATH_CLAIR)/binary/clair); \ + $(call _get_binary, https://storage.googleapis.com/harbor-builds/bin/clair, $(DOCKERFILEPATH_CLAIR)/binary/clair); \ else \ cd $(DOCKERFILEPATH_CLAIR) && $(DOCKERFILEPATH_CLAIR)/builder $(CLAIRVERSION); \ fi ; \ diff --git a/make/photon/clair/Dockerfile b/make/photon/clair/Dockerfile index f3c4cc14c..0c8a485e5 100644 --- a/make/photon/clair/Dockerfile +++ b/make/photon/clair/Dockerfile @@ -5,10 +5,10 @@ RUN tdnf distro-sync -y \ && tdnf erase vim -y \ && tdnf install -y git shadow sudo bzr rpm xz python-xml >>/dev/null\ && tdnf clean all \ - && mkdir /clair2.0.1/ \ + && mkdir /clair/ \ && groupadd -r -g 10000 clair \ && useradd --no-log-init -m -r -g 10000 -u 10000 clair -COPY ./binary/clair /clair2.0.1/ +COPY ./binary/clair /clair/ COPY docker-entrypoint.sh /docker-entrypoint.sh COPY dumb-init /dumb-init @@ -16,8 +16,8 @@ VOLUME /config EXPOSE 6060 6061 -RUN chown -R 10000:10000 /clair2.0.1 \ - && chmod u+x /clair2.0.1/clair \ +RUN chown -R 10000:10000 /clair \ + && chmod u+x /clair/clair \ && chmod u+x /docker-entrypoint.sh \ && chmod +x /dumb-init diff --git a/make/photon/clair/Dockerfile.binary b/make/photon/clair/Dockerfile.binary index 2b10ec73c..4cdf7d0f3 100644 --- a/make/photon/clair/Dockerfile.binary +++ b/make/photon/clair/Dockerfile.binary @@ -1,6 +1,6 @@ -FROM golang:1.7.3 +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 \ No newline at end of file +RUN go install -v github.com/coreos/clair/cmd/clair diff --git a/make/photon/clair/docker-entrypoint.sh b/make/photon/clair/docker-entrypoint.sh index f8e60defb..6ed1c969c 100644 --- a/make/photon/clair/docker-entrypoint.sh +++ b/make/photon/clair/docker-entrypoint.sh @@ -1,4 +1,4 @@ #!/bin/bash set -e -sudo -E -H -u \#10000 sh -c "/dumb-init -- /clair2.0.1/clair -config /etc/clair/config.yaml" +sudo -E -H -u \#10000 sh -c "/dumb-init -- /clair/clair -config /etc/clair/config.yaml" set +e