Compare commits

..

No commits in common. "7d2c192b956fe4e4dfcb03f38c7e164c208aacf6" and "c40c5b5a33f3204185f76d8ac8fb2f8d44faa420" have entirely different histories.

View File

@ -8,13 +8,17 @@ spec:
- name: DOCKERFILE
type: string
description: The path to the dockerfile to build
default: Dockerfile
default: /Dockerfile
- name: CONTEXT
type: string
description: The build context used by Docker.
default: .
default: ./
- name: IMAGE
type: string
description: Name (reference) of the image to build.
- name: EXTRA_ARGS
type: string
default: ""
resources:
inputs:
- name: src
@ -25,35 +29,24 @@ spec:
steps:
- name: build-and-push
workingDir: /workspace/src
image: moby/buildkit:latest
image: gcr.io/kaniko-project/executor:latest
env:
- name: DOCKER_CONFIG
value: /root/.docker
value: /kaniko/.docker
command:
- 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)
- /kaniko/executor
- $(params.EXTRA_ARGS)
- --dockerfile=/workspace/src/$(params.DOCKERFILE)
- --context=/workspace/src/$(params.CONTEXT)
- --destination=$(params.IMAGE)
- --oci-layout-path=/workspace/src/image-digest
- --digest-file=/tekton/results/IMAGE_DIGEST
- --cache=true
securityContext:
privileged: true
runAsUser: 0
volumeMounts:
- name: docker-config
mountPath: /root/.docker/config.json
mountPath: /kaniko/.docker/config.json
subPath: config.json
volumes:
- name: docker-config