Commit 9a262db5 authored by Kevin Daudt's avatar Kevin Daudt

docker-image: use proper platform designations

The platform argument for docker build uses different names for arches
than the image prefix. For example, to pull an image for armv7, you need
to use `arm32v7/alpine`, but to build an image for that arch, you should
use `--platform arm`.

Use a separate environment variable to designating the docker platform.
parent 95cfc969
Pipeline #6473 passed with stage
in 35 seconds
......@@ -43,7 +43,7 @@ lint:
script:
- >
docker build --no-cache
--platform $DOCKER_ARCH
--platform $DOCKER_PLATFORM
--build-arg DOCKER_ARCH=$DOCKER_ARCH/
--build-arg ALPINE_ARCH=-$ARCH
-t $CI_PROJECT_NAME:latest-$ARCH .
......@@ -80,6 +80,7 @@ build-x86:
variables:
ARCH: x86
DOCKER_ARCH: i386
DOCKER_PLATFORM: 386
except:
variables:
- $DISABLE_X86
......@@ -120,6 +121,7 @@ build-armv7:
variables:
ARCH: armv7
DOCKER_ARCH: arm32v7
DOCKER_PLATFORM: arm
except:
variables:
- $DISABLE_ARMV7
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment