mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 17:49:10 +00:00
Merge pull request #2728 from arm64b/rm-content-trust-build-wr
alpine: Remove the 'content trust build' workaround
This commit is contained in:
commit
29f711be94
@ -4,26 +4,11 @@ ORG?=linuxkit
|
|||||||
IMAGE=alpine
|
IMAGE=alpine
|
||||||
DEPS=packages
|
DEPS=packages
|
||||||
|
|
||||||
# The logic for content trust is a bit convoluted because:
|
ifeq ($(DOCKER_CONTENT_TRUST),)
|
||||||
# - The arm64 base image is currently not signed so we need to pull it
|
ifndef NOTRUST
|
||||||
# with content trust disabled. This is controlled by
|
|
||||||
# DOCKER_CONTENT_PULL.
|
|
||||||
# - 'docker build' with the FROM image supplied as environment
|
|
||||||
# variable *and* with DOCKER_CONTENT_TRUST=1 currently does not work
|
|
||||||
# (https://github.com/moby/moby/issues/34199). We therefor build
|
|
||||||
# with DOCKER_CONTENT_TRUST explicitly set to 0. However, we pull
|
|
||||||
# the base image just before with content trust enabled (if
|
|
||||||
# supported, see above).
|
|
||||||
# - By default we always pull and push the linuxkit/alpine image with
|
|
||||||
# content trust, unless explicitly disabled with NOTRUST. Once the
|
|
||||||
# above issues are resolved, this will be the only mechanism to control
|
|
||||||
# content trust.
|
|
||||||
ifdef NOTRUST
|
|
||||||
DOCKER_CONTENT_PULL=0
|
|
||||||
else
|
|
||||||
DOCKER_CONTENT_PULL=1
|
|
||||||
export DOCKER_CONTENT_TRUST=1
|
export DOCKER_CONTENT_TRUST=1
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ARCH := $(shell uname -m)
|
ARCH := $(shell uname -m)
|
||||||
ifeq ($(ARCH), x86_64)
|
ifeq ($(ARCH), x86_64)
|
||||||
@ -41,7 +26,7 @@ show-tag:
|
|||||||
@sed -n -e '1s/# \(.*\/.*:[0-9a-f]\{40\}\)/\1/p;q' versions.$(ARCH)
|
@sed -n -e '1s/# \(.*\/.*:[0-9a-f]\{40\}\)/\1/p;q' versions.$(ARCH)
|
||||||
|
|
||||||
iid: Dockerfile Makefile $(DEPS)
|
iid: Dockerfile Makefile $(DEPS)
|
||||||
DOCKER_CONTENT_TRUST=1 docker build --no-cache --iidfile iid .
|
docker build --no-cache --iidfile iid .
|
||||||
|
|
||||||
hash: Makefile iid
|
hash: Makefile iid
|
||||||
docker run --rm $(shell cat iid) sh -c 'echo Dockerfile /lib/apk/db/installed $$(find /mirror -name '*.apk' -type f) $$(find /go/bin -type f) | xargs cat | sha1sum' | sed 's/ .*//' | sed 's/$$/$(SUFFIX)/'> $@
|
docker run --rm $(shell cat iid) sh -c 'echo Dockerfile /lib/apk/db/installed $$(find /mirror -name '*.apk' -type f) $$(find /go/bin -type f) | xargs cat | sha1sum' | sed 's/ .*//' | sed 's/$$/$(SUFFIX)/'> $@
|
||||||
|
Loading…
Reference in New Issue
Block a user