blob: b0f494802c7607e648e1e03c9b9494d5f31b7468 [file] [log] [blame]
# This step is needed to add a new entry to /proc/sys/fs/binfmt_misc. Docker
# uses QEMU user emulation to run arm64 programs on x86 hosts. A QEMU
# interpreter needs to be added to /proc/sys/fs/binfmt_misc to run arm64
# programs.
- name: ''
args: ['run', '--privileged', 'linuxkit/binfmt:v0.7']
# The default builder (which appears to be the Docker daemon that implements
# the old, familiar `docker build` behavior) doesn't support the --platform
# flag, so we need to create a new builder.
- name: ''
args: ['buildx', 'create', '--name', 'builder']
- name: ''
args: ['buildx', 'use', 'builder']
# Images produced in this way do not appear in the Docker image registry shown
# by `docker images`, at least by default. We use the --push flag to push the
# image after building it, because a subsequent `docker push` won't find the
# image locally.
- name: ''
args: ['buildx', 'build', '--platform', 'linux/amd64', '--build-arg', 'BUILDKIT_INLINE_CACHE=1', '-f', 'src/cmd/cos_gpu_installer/Dockerfile', '-t', '${_OUTPUT_PROJECT}/cos-gpu-installer:latest', '-t', '${_OUTPUT_PROJECT}/cos-gpu-installer:${TAG_NAME}', '--cache-from', '${_OUTPUT_PROJECT}/cos-gpu-installer:latest', '--push', '.']
- name: ''
args: ['pull','${_OUTPUT_PROJECT}/cos-gpu-installer:${TAG_NAME}']
timeout: 1800s