Created
November 12, 2023 17:27
-
-
Save paolobarbolini/74318634376c7c1304f094bb75692019 to your computer and use it in GitHub Desktop.
Gitlab CI example for MultiArch images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: docker:latest | |
variables: | |
DOCKER_BUILDKIT: 1 | |
services: | |
- docker:dind | |
build: | |
before_script: | |
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY | |
script: | |
# https://github.com/docker/buildx/issues/413 | |
- docker context create multiarch-context | |
- docker buildx create --name multiarch-builder --use multiarch-context --bootstrap | |
- docker buildx build --push --platform linux/arm64,linux/amd64 --tag $CI_REGISTRY_IMAGE:latest . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment