File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 55 - docker:24.0.2-dind
66 variables :
77 DOCKER_BUILDKIT : 1
8- DOCKER_IMAGE_NAME : $CI_PROJECT_NAME
8+ DOCKER_IMAGE_NAME : $CI_REGISTRY_IMAGE
99 DOCKER_IMAGE_TAG : $CI_COMMIT_SHA
1010 DOCKER_IMAGE_TAG_SUFFIX : " "
11- DOCKER_PLATFORM : " linux/arm64,linux/amd64"
11+ DOCKER_PLATFORM : " linux /arm64,linux/amd64"
1212 DOCKER_TARGET : dev
1313 before_script :
1414 - apk add --no-cache qemu bash git
1515 script :
1616 - docker buildx create --use
1717 - docker buildx inspect --bootstrap
18+ - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
1819 - |
20+ echo "###### Building $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG$DOCKER_IMAGE_TAG_SUFFIX - Cache from $DOCKER_IMAGE_NAME:cache ########"
1921 docker buildx build \
2022 --target=$DOCKER_TARGET \
2123 --tag=$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG$DOCKER_IMAGE_TAG_SUFFIX \
2224 --platform=$DOCKER_PLATFORM \
23- --cache-to=type=local,dest=/tmp/.buildx-cache \
24- --cache-from=type=local,src=/tmp/.buildx-cache \
25+ --cache-from type=registry,ref=$DOCKER_IMAGE_NAME:cache \
26+ --cache-to type=registry,ref=$DOCKER_IMAGE_NAME:cache \
27+ --push \
2528 .
26- artifacts :
27- paths :
28- - /tmp/.buildx-cache
29- expire_in : 1h
29+ # TODO: Sign image using Cosign
You can’t perform that action at this time.
0 commit comments