Skip to content

Instantly share code, notes, and snippets.

@cedrickring
Last active December 9, 2018 19:43
Show Gist options
  • Save cedrickring/90029377857ee2d3162caf76221c67dd to your computer and use it in GitHub Desktop.
Save cedrickring/90029377857ee2d3162caf76221c67dd to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: kaniko
spec:
initContainers:
- name: kaniko-init
image: alpine
args:
- "sh"
- "-c"
- "while true; do sleep 1; if [ -f /tmp/complete ]; then break; fi done"
volumeMounts:
- name: build-context
mountPath: /kaniko/build-context
containers:
- name: kaniko
image: gcr.io/kaniko-project/executor:latest
args:
- "--dockerfile=Dockerfile"
- "--context=dir:///kaniko/build-context"
- "--destination=mytag:latest"
volumeMounts:
- name: build-context
mountPath: /kaniko/build-context
- name: docker-config
mountPath: /kaniko/.docker
volumes:
- name: docker-config
configMap:
name: docker-config
- name: build-context
emptyDir: {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment