Skip to content

Commit e6fa062

Browse files
committed
feat(ci): Add multi-arch Docker build support with buildx
1 parent 3d5673a commit e6fa062

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.gitlab-ci.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ docker-build:
2323
# All branches are tagged with $DOCKER_IMAGE_NAME (defaults to commit ref slug)
2424
# Default branch is also tagged with `latest`
2525
script:
26-
- docker buildx create --use
27-
- |
28-
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
29-
docker buildx build --platform linux/amd64,linux/arm64 --push -t "$DOCKER_IMAGE_NAME" -t "$CI_REGISTRY_IMAGE:latest" .
30-
else
31-
docker buildx build --platform linux/amd64,linux/arm64 --push -t "$DOCKER_IMAGE_NAME" .
32-
fi
26+
- docker buildx create --use
27+
# doamne ajuta
28+
- |
29+
if [[ "$CI_COMMIT_BRANCH" == "$CI_DEFAULT_BRANCH" ]]; then
30+
docker buildx build --platform linux/amd64,linux/arm64 --push -t "$DOCKER_IMAGE_NAME" -t "$CI_REGISTRY_IMAGE:latest" .
31+
else
32+
docker buildx build --platform linux/amd64,linux/arm64 --push -t "$DOCKER_IMAGE_NAME" .
33+
fi
3334
# Run this job in a branch where a Dockerfile exists
3435
rules:
3536
- if: $CI_COMMIT_BRANCH

0 commit comments

Comments
 (0)