Skip to content

Instantly share code, notes, and snippets.

@nicosingh
Created August 19, 2021 16:00
Show Gist options
  • Save nicosingh/342e8ddf41c533382cbf84db6780077c to your computer and use it in GitHub Desktop.
Save nicosingh/342e8ddf41c533382cbf84db6780077c to your computer and use it in GitHub Desktop.
image: docker:20.10.8
services:
- docker:20.10.8-dind
variables:
DOCKER_DRIVER: overlay2
BUILDX_VERSION: "v0.6.1"
BUILDX_ARCH: "linux-amd64"
docker-build:
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:
- docker-buildx create --use
- docker-buildx build
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
--tag ${CI_REGISTRY_IMAGE}:latest
--push
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment