php-framework/docs/publish/docker.md
Snider f831fd6846 docs: restructure with Build/Publish sections and dynamic nav
- Move PHP and Go framework docs from /packages/ to /build/
- Move CLI docs from /packages/go/cmd/ to /build/cli/
- Add /publish/ section with docs for all release publishers:
  GitHub, Docker, npm, Homebrew, Scoop, AUR, Chocolatey, LinuxKit
- Add sidebar navigation for /publish/ section
- Update nav with Build, Publish, Deploy dropdowns
- Remove changelog, contributing, guide, and security sections
- Make sidebar auto-discover from packages, build, publish, deploy dirs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 22:20:32 +00:00

93 lines
1.7 KiB
Markdown

# 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
| 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
```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
| 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.