Docker Push

Docker Push

Certified

Push Docker images to a registry

Pushes existing local images by tag to a remote registry using the available Docker daemon and optional registry credentials. Tags must already exist locally.

yaml
type: io.kestra.plugin.docker.cli.Push

Push a previously built image to DockerHub

yaml
id: docker_push
namespace: company.team

tasks:
  - id: push
    type: io.kestra.plugin.docker.cli.Push
    tags:
      - image/demo:latest
    credentials:
      registry: https://index.docker.io/v1/
      username: "{{ secret('DOCKERHUB_USERNAME') }}"
      password: "{{ secret('DOCKERHUB_PASSWORD') }}"

Push the image from a previous Build task

yaml
id: docker_push_with_tag
namespace: company.team

tasks:
  - id: build
    type: io.kestra.plugin.docker.cli.Build
    dockerfile: |
      FROM alpine
      RUN echo "hello"
    tags:
      - my-registry.example.com/my-app:latest

  - id: push
    type: io.kestra.plugin.docker.cli.Push
    tags:
      - my-registry.example.com/my-app:latest
    credentials:
      registry: my-registry.example.com
      username: "{{ secret('REGISTRY_USERNAME') }}"
      password: "{{ secret('REGISTRY_PASSWORD') }}"
Properties
SubTypestring

Image tags to push

Provide one or more tags; use fully qualified references for custom registries.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Docker configuration file

Docker configuration file that can set access credentials to private container registries. Usually located in ~/.docker/config.json.

Credentials for a private container registry

Definitions
authstring

The registry authentication.

The auth field is a base64-encoded authentication string of username: password or a token.

identityTokenstring

The identity token.

passwordstring

The registry password.

registrystring

The registry URL.

If not defined, the registry will be extracted from the image name.

registryTokenstring

The registry token.

usernamestring

The registry username.

Docker host or URI

The Docker daemon to connect to, e.g. tcp://localhost: 2375 or a Unix socket path. Defaults to the daemon available to the task runner.

Unitbytes

Total bytes pushed to the container registry