-
Notifications
You must be signed in to change notification settings - Fork 1
/
buildah.template.yaml
35 lines (33 loc) · 1.05 KB
/
buildah.template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
apiVersion: build.knative.dev/v1alpha1
kind: BuildTemplate
metadata:
name: buildah
spec:
parameters:
- name: BUILDER_IMAGE
description: The location of the buildah builder image.
default: vdemeester/buildah-builder
- name: IMAGE
description: The name of the image to push.
- name: DOCKERFILE
description: Path to the Dockerfile to build.
default: ./Dockerfile
- name: TLSVERIFY
description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry)
default: "true"
steps:
- name: build
image: ${BUILDER_IMAGE}
args: ['bud', '--tls-verify=${TLSVERIFY}', '--layers', '-f', '${DOCKERFILE}', '-t', '${IMAGE}', '.']
volumeMounts:
- name: varlibcontainers
mountPath: /var/lib/containers
- name: push
image: ${BUILDER_IMAGE}
args: ['push', '--tls-verify=${TLSVERIFY}', '--authfile=/builder/home/.docker/config.json', '${IMAGE}', 'docker://${IMAGE}']
volumeMounts:
- name: varlibcontainers
mountPath: /var/lib/containers
volumes:
- name: varlibcontainers
emptyDir: {}