mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-02-15 08:59:30 -07:00
gitlab: build containers with buildkit and metadata
According to the documentation to be able to use --cache-from for remote registries you need to enable both buildkit and inline the metadata. We want to do this to support pulling from gitlab when users build their local docker images. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200701135652.1366-24-alex.bennee@linaro.org>
This commit is contained in:
parent
c962864f1d
commit
8a8a50a957
1 changed files with 3 additions and 1 deletions
|
|
@ -11,7 +11,9 @@
|
|||
script:
|
||||
- docker pull "$TAG" || docker pull "$COMMON_TAG" || true
|
||||
- sed -i -e "s,FROM qemu/,FROM $CI_REGISTRY_IMAGE/qemu/," tests/docker/dockerfiles/$NAME.docker
|
||||
- docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$TAG" -f "tests/docker/dockerfiles/$NAME.docker" tests/docker/dockerfiles
|
||||
- DOCKER_BUILDKIT=1 docker build --cache-from "$TAG" --cache-from "$COMMON_TAG" --tag "$TAG"
|
||||
--build-arg BUILDKIT_INLINE_CACHE=1
|
||||
-f "tests/docker/dockerfiles/$NAME.docker" tests/docker/dockerfiles
|
||||
- docker push "$TAG"
|
||||
after_script:
|
||||
- docker logout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue