hud push
command publishes your environment image to a Docker registry and uploads metadata to the HUD registry.
Usage
Arguments
Environment directory containing hud.lock.yaml
Options
Override registry image name (e.g.,
myorg/myenv
). Short: -i
Override tag (e.g.,
v1.0
, latest
). Short: -t
Sign the image with cosign (not yet implemented)
Skip confirmation prompts. Short:
-y
Show detailed output. Short:
-v
Prerequisites
Requires
HUD_API_KEY
:Login to your Docker registry first (e.g., Docker Hub or GHCR):
What It Does
1
Verify Build
Ensures a recent
hud build
exists (lock file present), prompting to build if missing.2
Choose Target
Determines target image:
--image
if provided- Else auto-detects Docker Hub username and uses
username/{name}:{tag}
- Tag uses
--tag
, or the lock’s internalbuild.version
, else current tag
3
Push Image
Tags and pushes via Docker; captures pushed digest.
4
Update Lock
Updates
hud.lock.yaml
with:image
: full registry reference with digestpush
:source
,pushedAt
,registry
, andimage_with_tag
5
Upload Metadata
Uploads lock metadata to the HUD registry path
.../registry/envs/{org}/{name}:{tag}
.Registry Detection
- Explicit
--image
→ used as‑is. - Docker config → reads logged‑in username (Docker Hub).
- Default → prompts if no login and
--image
missing.
Examples
Lock File After Push
Notes
- If HUD registry upload fails, the Docker push still succeeds; you can share
hud.lock.yaml
manually. - Image names must include
org/name
for HUD registry uploads.
See Also
hud build
hud pull
hud analyze
- Build Environments - Getting started with HUD environments