Skip to content

Commit

Permalink
images/alpine: Build for arm64
Browse files Browse the repository at this point in the history
This commit adds a Google Cloud Build definition for building alpine
arm64 images and pushing them as a manifest list together with their
amd64 counterparts.
  • Loading branch information
LorbusChris committed Jun 10, 2021
1 parent ae26658 commit ef41cf0
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion images/alpine/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,31 @@ steps:
dir: .
- name: gcr.io/cloud-builders/docker
args:
- tag
- build
- -t
- gcr.io/$PROJECT_ID/alpine:$_GIT_TAG-arm64
- --build-arg=ARCH=arm64
- --build-arg=IMAGE_ARG=gcr.io/$PROJECT_ID/alpine:$_GIT_TAG-arm64
- .
- name: 'gcr.io/cloud-builders/docker'
env: ['DOCKER_CLI_EXPERIMENTAL=enabled']
args:
- manifest
- create
- gcr.io/$PROJECT_ID/alpine:latest
- --amend
- gcr.io/$PROJECT_ID/alpine:$_GIT_TAG
- --amend
- gcr.io/$PROJECT_ID/alpine:$_GIT_TAG-arm64
- name: 'gcr.io/cloud-builders/docker'
env: ['DOCKER_CLI_EXPERIMENTAL=enabled']
args:
- manifest
- push
- gcr.io/$PROJECT_ID/alpine:latest
substitutions:
_GIT_TAG: '12345'
images:
- 'gcr.io/$PROJECT_ID/alpine:$_GIT_TAG'
- 'gcr.io/$PROJECT_ID/alpine:$_GIT_TAG-arm64'
- 'gcr.io/$PROJECT_ID/alpine:latest'

0 comments on commit ef41cf0

Please sign in to comment.