From 8fe42115a68185ffaeaa1a93fe45c07b45046d2a Mon Sep 17 00:00:00 2001 From: Jonas Zohren Date: Wed, 18 Oct 2023 13:10:36 +0000 Subject: [PATCH] ci: Update some docker settings --- .gitlab-ci.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3bbed5b3..937dacd1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,18 +21,20 @@ variables: variables: # Docker in Docker: DOCKER_BUILDKIT: 1 + DOCKER_TLS_CERTDIR: "/certs" image: name: docker.io/docker services: - name: docker.io/docker:dind alias: docker script: + - docker context create ci-context - > docker buildx create --name "multi" --driver "docker-container" - --platform "linux/arm64,linux/arm/v7" - --use + --platform "linux/arm64,linux/arm/v7,linux/amd64" + --use ci-context # Authorize against this project's own image registry: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY # Build multiplatform image and push to temporary tag: @@ -40,6 +42,9 @@ variables: docker buildx build --platform "linux/arm/v7,linux/arm64,linux/amd64" --pull + --cache-from=type=registry,ref=$CI_REGISTRY_IMAGE/$TAG + --cache-from=type=registry,ref=$CI_REGISTRY_IMAGE/matrix-conduit:next + --ulimit nofile=2048 --tag "$CI_REGISTRY_IMAGE/temporary-ci-images:$CI_JOB_ID" --push --provenance=false @@ -48,6 +53,7 @@ variables: - > docker buildx build --platform "linux/arm/v7,linux/arm64,linux/amd64" + --ulimit nofile=2048 --target "packager-result" --output="type=local,dest=/tmp/build-output" --provenance=false @@ -56,6 +62,7 @@ variables: - > docker buildx build --platform "linux/arm/v7,linux/arm64,linux/amd64" + --ulimit nofile=2048 --target "builder-result" --output="type=local,dest=/tmp/build-output" --provenance=false