docs/publish/docker.md
Snider 85bbb8e828 docs: initial import of CorePHP documentation
173 markdown files covering:
- Framework architecture (lifecycle events, module system, multi-tenancy)
- Package docs (admin, api, mcp, tenant, commerce, content, developer)
- CLI reference (dev, build, go, php, deploy commands)
- Patterns (actions, repositories, seeders, services, HLCRF)
- Deployment (Docker, PHP, LinuxKit, templates)
- Publishing (Homebrew, AUR, npm, Docker, Scoop, Chocolatey)

Source: core-php/docs (core.help content)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-03 17:51:03 +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.