Browse Source

Improved multi-arch builds

master
Marcus Noble 1 year ago
parent
commit
7d2c192b95
1 changed files with 19 additions and 19 deletions
  1. +19
    -19
      tekton/tasks/docker-build-and-publish.yaml

+ 19
- 19
tekton/tasks/docker-build-and-publish.yaml View File

@@ -30,25 +30,25 @@ spec:
- name: DOCKER_CONFIG
value: /root/.docker
command:
- buildctl-daemonless.sh
- --debug
- build
- --progress=plain
- --frontend=dockerfile.v0
- --opt
- filename=$(params.DOCKERFILE)
- --opt
- platform=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
- --local
- context=$(params.CONTEXT)
- --local
- dockerfile=.
- --output
- type=image,name=$(params.IMAGE),push=true
- --export-cache
- type=inline
- --import-cache
- type=registry,ref=$(params.IMAGE)
- sh
- -c
- |
PLATFORMS=$(grep 'PLATFORMS ?= ' Makefile | sed -E 's/^PLATFORMS \?= (.+)$/\1/')
if [ -z $PLATFORMS ]; then
PLATFORMS=linux/amd64
fi
buildctl-daemonless.sh --debug \
build \
--progress=plain \
--frontend=dockerfile.v0 \
--opt filename=$(params.DOCKERFILE) \
--opt platform=${PLATFORMS} \
--local context=$(params.CONTEXT) \
--local dockerfile=. \
--output type=image,name=$(params.IMAGE),push=true \
--export-cache type=inline \
--import-cache type=registry,ref=$(params.IMAGE)
securityContext:
privileged: true
volumeMounts:


Loading…
Cancel
Save