-
Notifications
You must be signed in to change notification settings - Fork 3
/
build-example.yaml
30 lines (30 loc) · 886 Bytes
/
build-example.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
apiVersion: batch/v1
kind: Job
metadata:
name: builder
spec:
template:
spec:
restartPolicy: Never
containers:
- image: estesp/buildexample:1.0
command: ["buildctl"]
args: ["--addr=tcp://buildkitd:1234", "build",
"--progress=plain",
"--frontend=dockerfile.v0",
"--frontend-opt", "filename=Dockerfile.example",
"--local", "context=.", "--local", "dockerfile=.",
"--exporter=image", "--exporter-opt", "name=estesp/mybkimg:latest", "--exporter-opt", "push=true"]
name: build-example
env:
- name: DOCKER_CONFIG
value: "/etc/docker"
volumeMounts:
- name: configjson
mountPath: "/etc/docker"
readOnly: true
volumes:
- name: configjson
secret:
secretName: dockerconfig
backoffLimit: 2