mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-23 23:27: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
|
- docker
|
||||||
|
|
||||||
build:docker-development:
|
build:docker-development:
|
||||||
image:
|
image: docker:20.10.11
|
||||||
name: gcr.io/kaniko-project/executor:v1.6.0-debug
|
|
||||||
entrypoint: [""]
|
services:
|
||||||
|
- docker:20.10.11-dind
|
||||||
|
|
||||||
|
variables:
|
||||||
|
DOCKER_DRIVER: overlay2
|
||||||
|
BUILDX_VERSION: "v0.7.1"
|
||||||
|
BUILDX_ARCH: "linux-amd64"
|
||||||
before_script:
|
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:
|
script:
|
||||||
- mkdir -p /kaniko/.docker
|
- docker-buildx create --use
|
||||||
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
- docker-buildx build
|
||||||
- /kaniko/executor --force --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:dev-latest
|
--platform linux/386,linux/amd64,linux/amd64,linux/arm/v7,linux/arm64/v8
|
||||||
only:
|
--tag ${CI_REGISTRY_IMAGE}:test
|
||||||
- development
|
--push
|
||||||
|
# only:
|
||||||
|
# - development
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
Loading…
Reference in New Issue
Block a user