diff --git a/kaniko/dockerfile b/kaniko/dockerfile new file mode 100644 index 0000000000..0290bf16ed --- /dev/null +++ b/kaniko/dockerfile @@ -0,0 +1,2 @@ +FROM ubuntu +ENTRYPOINT ["/bin/bash", "-c", "echo hello"] diff --git a/kaniko/pod.yaml b/kaniko/pod.yaml new file mode 100644 index 0000000000..17f9a81b6d --- /dev/null +++ b/kaniko/pod.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Pod +metadata: + name: kaniko +spec: + containers: + - name: kaniko + image: gcr.io/kaniko-project/executor:latest + args: ["--dockerfile=/workspace/dockerfile", + "--context=dir://workspace", + "--no-push"] + volumeMounts: + - name: dockerfile-storage + mountPath: /workspace + restartPolicy: Never + volumes: + - name: dockerfile-storage + persistentVolumeClaim: + claimName: dockerfile-claim diff --git a/kaniko/volume-claim.yaml b/kaniko/volume-claim.yaml new file mode 100644 index 0000000000..7a1abbf05c --- /dev/null +++ b/kaniko/volume-claim.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: dockerfile-claim +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 8Gi + storageClassName: local-storage diff --git a/kaniko/volume.yaml b/kaniko/volume.yaml new file mode 100644 index 0000000000..e44663ec5a --- /dev/null +++ b/kaniko/volume.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: dockerfile + labels: + type: local +spec: + capacity: + storage: 10Gi + accessModes: + - ReadWriteOnce + storageClassName: local-storage + hostPath: + path: /home/docker/kaniko # Path to the local mount directory that was setup