mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-23 15:17:57 +01:00
switch docker build to buildx for multiarch
This commit is contained in:
parent
6b88191dc5
commit
2f2d2216af
@ -97,17 +97,29 @@ build:docker-releases:
|
||||
- docker
|
||||
|
||||
build:docker-development:
|
||||
image:
|
||||
name: gcr.io/kaniko-project/executor:v1.6.0-debug
|
||||
entrypoint: [""]
|
||||
image: docker:20.10.11
|
||||
|
||||
services:
|
||||
- docker:20.10.11-dind
|
||||
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay2
|
||||
BUILDX_VERSION: "v0.7.1"
|
||||
BUILDX_ARCH: "linux-amd64"
|
||||
before_script:
|
||||
- ''
|
||||
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY --username
|
||||
$CI_REGISTRY_USER --password-stdin
|
||||
# - wget -O /usr/bin/docker-buildx
|
||||
# https://github.com/docker/buildx/releases/download/${BUILDX_VERSION}/buildx-${BUILDX_VERSION}.${BUILDX_ARCH}
|
||||
# - chmod +x /usr/bin/docker-buildx
|
||||
script:
|
||||
- mkdir -p /kaniko/.docker
|
||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
||||
- /kaniko/executor --force --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:dev-latest
|
||||
only:
|
||||
- development
|
||||
- docker-buildx create --use
|
||||
- docker-buildx build
|
||||
--platform linux/386,linux/amd64,linux/amd64,linux/arm/v7,linux/arm64/v8
|
||||
--tag ${CI_REGISTRY_IMAGE}:test
|
||||
--push
|
||||
# only:
|
||||
# - development
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
|
Loading…
Reference in New Issue
Block a user