Skip to content

Docker

Push container images to Docker Hub, GitHub Container Registry, AWS ECR, or any OCI-compliant registry.

Configuration

yaml
publishers:
  - type: docker
    registry: ghcr.io
    image: org/myapp

Options

OptionDescriptionDefault
registryRegistry hostnamedocker.io
imageImage nameProject name
platformsTarget platformslinux/amd64
tagsImage tagslatest, version
dockerfileDockerfile pathDockerfile
contextBuild context.

Examples

GitHub Container Registry

yaml
publishers:
  - type: docker
    registry: ghcr.io
    image: host-uk/myapp
    platforms:
      - linux/amd64
      - linux/arm64
    tags:
      - latest
      - "{{ .Version }}"
      - "{{ .Major }}.{{ .Minor }}"

Docker Hub

yaml
publishers:
  - type: docker
    image: myorg/myapp
    tags:
      - latest
      - "{{ .Version }}"

AWS ECR

yaml
publishers:
  - type: docker
    registry: 123456789.dkr.ecr.eu-west-1.amazonaws.com
    image: myapp

Multi-Platform Build

yaml
publishers:
  - type: docker
    platforms:
      - linux/amd64
      - linux/arm64
      - linux/arm/v7

Environment Variables

VariableDescription
DOCKER_USERNAMERegistry username
DOCKER_PASSWORDRegistry password or token
AWS_ACCESS_KEY_IDAWS credentials (for ECR)
AWS_SECRET_ACCESS_KEYAWS credentials (for ECR)

Tag Templates

TemplateExample
.Version1.2.3
.Major1
.Minor2
.Patch3
.Major + .Minor1.2

Templates use Go template syntax with double braces.

Released under the EUPL-1.2 License.