mirror of
https://gitlab.com/Bockiii/deemix-docker.git
synced 2024-08-30 17:32:18 +00:00
30 lines
951 B
YAML
30 lines
951 B
YAML
|
image: docker:latest
|
||
|
services:
|
||
|
- docker:dind
|
||
|
|
||
|
stages:
|
||
|
- build
|
||
|
|
||
|
variables:
|
||
|
IMAGE: registry.gitlab.com/bockiii/deemix-docker
|
||
|
DOCKER_CLI_EXPERIMENTAL: enabled
|
||
|
ARCH_AMD: python3
|
||
|
ARCH_ARM32: python3.armhf
|
||
|
ARCH_ARM64: python3.arm64
|
||
|
|
||
|
before_script:
|
||
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||
|
|
||
|
build:
|
||
|
stage: build
|
||
|
script:
|
||
|
- docker build --build-arg IMAGE_ARCH=$ARCH_AMD --pull -t $IMAGE:amd64 .
|
||
|
- docker push $IMAGE:amd64
|
||
|
- docker build --build-arg IMAGE_ARCH=$ARCH_ARM32 --pull -t $IMAGE:arm32v7 .
|
||
|
- docker push $IMAGE:armhf
|
||
|
- docker build --build-arg IMAGE_ARCH=$ARCH_ARM64 --pull -t $IMAGE:arm64v8 .
|
||
|
- docker push $IMAGE:arm64
|
||
|
- docker manifest create $IMAGE $IMAGE:amd64 $IMAGE:arm32v7 $IMAGE:arm64v8
|
||
|
- docker manifest annotate $IMAGE $IMAGE:arm32v7 --os linux --arch arm
|
||
|
- docker manifest annotate $IMAGE $IMAGE:arm64v8 --os linux --arch arm64
|
||
|
- docker manifest push $IMAGE
|