Add arm64 image build capability

This commit is contained in:
Andrejs Cunskis 2022-08-21 13:05:53 +03:00
parent acce4ded1b
commit c2838c613d
No known key found for this signature in database
GPG key ID: 87CB75083F227241
14 changed files with 43 additions and 60 deletions

View file

@ -8,6 +8,7 @@
docker buildx build \
--cache-to=type=inline \
--cache-from="$CI_REGISTRY_IMAGE:$1" \
--platform=linux/${ARCH:-amd64} \
--push="${PUSH_CUSTOM_IMAGE:-false}" \
--label "ci_pipeline_url=$CI_PIPELINE_URL" \
--label "ci_job_url=$CI_JOB_URL" \

View file

@ -1,6 +1,16 @@
.build_and_push:
stage: custom
needs: []
variables:
QEMU_IMAGE: tonistiigi/binfmt:qemu-v6.2.0
before_script:
- |
if [ "${ARCH:-amd64}" != "amd64" ]; then
echo -e "\033[1;33mInstalling latest qemu emulators\033[0m"
docker pull -q ${QEMU_IMAGE};
docker run --rm --privileged ${QEMU_IMAGE} --uninstall qemu-*;
docker run --rm --privileged ${QEMU_IMAGE} --install all;
fi
script:
- ./scripts/lib/custom-docker-build
rules: