Improved multi-arch builds
This commit is contained in:
parent
a7a29c0201
commit
7d2c192b95
@ -30,25 +30,25 @@ spec:
|
|||||||
- name: DOCKER_CONFIG
|
- name: DOCKER_CONFIG
|
||||||
value: /root/.docker
|
value: /root/.docker
|
||||||
command:
|
command:
|
||||||
- buildctl-daemonless.sh
|
- sh
|
||||||
- --debug
|
- -c
|
||||||
- build
|
- |
|
||||||
- --progress=plain
|
PLATFORMS=$(grep 'PLATFORMS ?= ' Makefile | sed -E 's/^PLATFORMS \?= (.+)$/\1/')
|
||||||
- --frontend=dockerfile.v0
|
if [ -z $PLATFORMS ]; then
|
||||||
- --opt
|
PLATFORMS=linux/amd64
|
||||||
- filename=$(params.DOCKERFILE)
|
fi
|
||||||
- --opt
|
|
||||||
- platform=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
buildctl-daemonless.sh --debug \
|
||||||
- --local
|
build \
|
||||||
- context=$(params.CONTEXT)
|
--progress=plain \
|
||||||
- --local
|
--frontend=dockerfile.v0 \
|
||||||
- dockerfile=.
|
--opt filename=$(params.DOCKERFILE) \
|
||||||
- --output
|
--opt platform=${PLATFORMS} \
|
||||||
- type=image,name=$(params.IMAGE),push=true
|
--local context=$(params.CONTEXT) \
|
||||||
- --export-cache
|
--local dockerfile=. \
|
||||||
- type=inline
|
--output type=image,name=$(params.IMAGE),push=true \
|
||||||
- --import-cache
|
--export-cache type=inline \
|
||||||
- type=registry,ref=$(params.IMAGE)
|
--import-cache type=registry,ref=$(params.IMAGE)
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
Loading…
Reference in New Issue
Block a user