Build
Build a Docker image and push it to a remote container registry.
type: "io.kestra.plugin.docker.Build"
Build and push a Docker image to a registry
id: docker_build
namespace: company.team
tasks:
- id: build
type: io.kestra.plugin.docker.Build
dockerfile: |
FROM ubuntu
ARG APT_PACKAGES=""
RUN apt-get update && apt-get install -y --no-install-recommends ${APT_PACKAGES};
platforms:
- linux/amd64
tags:
- private-registry.io/unit-test:latest
buildArgs:
APT_PACKAGES: curl
labels:
unit-test: "true"
credentials:
registry: <registry.url.com>
username: <your-user>
password: <your-password>
YES
Optional build arguments in a key: value
format.
YES
Docker configuration file.
Docker configuration file that can set access credentials to private container registries. Usually located in ~/.docker/config.json
.
YES
YES
The contents of your Dockerfile passed as a string, or a path to the Dockerfile
YES
The URI of your Docker host e.g. localhost
YES
The files to create on the local filesystem. It can be a map or a JSON object.
YES
Additional metadata for the image in a key: value
format.
NO
Inject namespace files.
Inject namespace files to this task. When enabled, it will, by default, load all namespace files into the working directory. However, you can use the include
or exclude
properties to limit which namespace files will be injected.
YES
The target platform for the image e.g. linux/amd64.
YES
true
YES
false
The generated image id.
YES
true
YES
A list of filters to exclude matching glob patterns. This allows you to exclude a subset of the Namespace Files from being downloaded at runtime. You can combine this property together with include
to only inject a subset of files that you need into the task's working directory.
YES
A list of filters to include only matching glob patterns. This allows you to only load a subset of the Namespace Files into the working directory.
YES
The registry authentication.
The auth
field is a base64-encoded authentication string of username: password
or a token.
YES
The identity token.
YES
The registry password.
YES
The registry URL.
If not defined, the registry will be extracted from the image name.
YES
The registry token.
YES
The registry username.