php/docs/publish/docker.md
Snider 28d004ff61
Some checks failed
CI / PHP 8.4 (push) Failing after 1m54s
CI / PHP 8.3 (push) Failing after 1m58s
feat: replace Go CLI with PHP framework
Go CLI commands moved to core/go-php. This repo now contains
the Laravel modular monolith framework (previously php-framework).

- Remove all Go files (now in core/go-php)
- Add PHP framework: event-driven module loading, lifecycle events
- Composer package: core/php
- core/php-framework remains as-is for backward compat

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 08:49:51 +00:00

1.7 KiB

Docker

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

Configuration

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

Options

Option Description Default
registry Registry hostname docker.io
image Image name Project name
platforms Target platforms linux/amd64
tags Image tags latest, version
dockerfile Dockerfile path Dockerfile
context Build context .

Examples

GitHub Container Registry

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

Docker Hub

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

AWS ECR

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

Multi-Platform Build

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

Environment Variables

Variable Description
DOCKER_USERNAME Registry username
DOCKER_PASSWORD Registry password or token
AWS_ACCESS_KEY_ID AWS credentials (for ECR)
AWS_SECRET_ACCESS_KEY AWS credentials (for ECR)

Tag Templates

Template Example
.Version 1.2.3
.Major 1
.Minor 2
.Patch 3
.Major + .Minor 1.2

Templates use Go template syntax with double braces.