Compare commits

..

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

View File

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