Skip to content

Instantly share code, notes, and snippets.

@tzununbekov
Last active October 23, 2018 11:17
Show Gist options
  • Save tzununbekov/cb89f19c4339b39fe0d8b4730523cdca to your computer and use it in GitHub Desktop.
Save tzununbekov/cb89f19c4339b39fe0d8b4730523cdca to your computer and use it in GitHub Desktop.
apiVersion: build.knative.dev/v1alpha1
kind: BuildTemplate
metadata:
name: kaniko
spec:
parameters:
- name: IMAGE
description: The name of the image to push
- name: DOCKERFILE
description: Path to the Dockerfile to build.
default: Dockerfile
- name: DIRECTORY
default: ""
steps:
- name: build-and-push
image: gcr.io/kaniko-project/executor:latest
args:
- --context=/workspace/${DIRECTORY}
- --dockerfile=/workspace/${DIRECTORY}/${DOCKERFILE}
- --destination=${IMAGE}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment