Build Image

step

This Kaniko step allows you to build a docker image from the git resource provided. It supports pushing images to GCR and Docker Hub. In your workflow, either specify a Secret named dockerhub whose value is the output of echo USER:PASSWORD | base64, or use a gcp parameter whose value is a Relay GCP connection.

Specification

destination

Required

string
The destination repository to push the image to after building.
context
Optional
string
The directory within the specified Git repository to use as the Docker context
dockerhub
Optional
string
If pushing to Docker Hub, a Secret containing the base64-encoded output of 'username:password'
gcp
Optional
If pushing to gcr.io, a Relay GCP connection to useConnection docs
!Connection {type: gcp, name: my-gcp-connection}
buildArgs
Optional
object
A mapping of build argument names to values to pass to the build.
dockerfile
Optional
string
Within the specified context directory, the path to the Dockerfile to build.
git

Required

object
A map of git configuration. If you're using HTTPS, only name and repository are required.
git.ssh_key

Required

string
The SSH key to use when cloning the git repository. You can pass the key to Relay as a secret. See the example below.
git.known_hosts
Optional
string
SSH known hosts file. Use a Relay secret to pass the contents of the file into the workflow as a base64-encoded string. See the example below.
git.name

Required

string
A directory name for the git clone.
git.branch
Optional
string
The Git branch to clone.
git.repository

Required

string
The git repository URL.

Join our community

We’re excited to see and share in our community’s creation. Take a look at our community overview to learn how to begin contributing to Relay.