Push Command
Tag, push, and optionally deploy an image to the Gordon registry.
gordon push
Synopsis
gordon push <domain> [options]
Arguments
| Argument | Description |
|---|---|
<domain> |
The route domain to resolve the registry and repository from |
Options
| Option | Description |
|---|---|
--build |
Build the image first using docker buildx |
-f, --file |
Path to Dockerfile (default: ./Dockerfile, used with --build) |
--platform |
Target platform for buildx (default: linux/amd64) |
--build-arg |
Additional build args (repeatable, KEY=VALUE) |
--tag |
Override version tag (default: tag ref from CI, then git describe --tags --dirty) |
--no-confirm |
Skip deploy confirmation prompt |
--no-deploy |
Push only; skip deployment prompt |
--remote |
Remote Gordon URL |
--token |
Authentication token for remote |
Description
gordon push resolves the route image for <domain>, tags the image for the
Gordon registry, pushes it, and optionally deploys it.
- The registry and repository are derived from the route image on the server.
- The version tag defaults to a CI tag ref (like
refs/tags/v1.2.3) when available, then falls back togit describe --tags --dirty(for examplev1.2.3-4-gabc1234orv1.2.3-dirty). If no tag is found,latestis used. - When
--buildis set, the command builds withdocker buildx build --loadand injectsVERSIONinto the build environment plus any--build-argvalues. - Use
-f/--fileto build from a Dockerfile outside the current directory root. - The version tag and
latestare both pushed (unless the version islatest).
Examples
# Build, push, and deploy
gordon push myapp.example.com --build
# Push existing local image, skip deploy
gordon push myapp.example.com --tag v1.2.0 --no-deploy
# Push and deploy without confirmation
gordon push myapp.example.com --no-confirm
# Build for ARM and pass build args
gordon push myapp.example.com --build --platform linux/arm64 --build-arg CGO_ENABLED=0
# Build from a custom Dockerfile path
gordon push myapp.example.com --build -f docker/app/Dockerfile
Notes
- Remote mode required. See CLI Overview for targeting options.
--buildrequires Docker with Buildx. Docker Desktop includes it; on Linux, install thedocker-buildx-pluginpackage.