Skip to main content

Overview

Push Docker images to configured container registries. Supports Docker Hub, private registries, and custom registry configurations with automatic tag management and authentication handling.

Endpoint

Query Parameters

env
integer
Environment ID containing the image to push. Optional for local environments.

Request Body

imageId
string
required
Image ID (SHA256 hash) to push
imageName
string
Current image name/tag (used for audit logging)
registryId
integer
required
Registry ID where the image will be pushed. Must be a configured registry.
newTag
string
Custom tag for the pushed image. If not provided, uses the image’s existing tag. Format: repository/name:tag or name:tag

Authentication

Requires images:push permission for the specified environment.

Registry Authentication

Registry credentials are retrieved from the database and sent to Docker API:

Response Format

Async Response (default)

Returns job ID for progress tracking:

Sync Response (with Accept: application/json)

Returns final result immediately:

Progress Events

Tagging

Pushing

Layer Progress

Complete

Error

Error Responses

400
object
Invalid request - missing required fields
400
object
Image has no tag
403
object
Permission denied
404
object
Registry not found
500
object
Push failed - authentication or network error

Tag Management

The push endpoint automatically handles tag formatting for different registry types:

Docker Hub

Docker Hub images don’t require host prefix:

Private Registries

Private registry pushes include the full host path:

Registry Prefix Removal

Existing registry prefixes are stripped before applying new target:

Edge Mode Support

For Hawser Edge environments:

Error Handling

The endpoint provides user-friendly error messages:

Usage Examples

Push to Docker Hub

Push to Private Registry

Push with Progress Tracking

Audit Logging

Push operations are logged with full details:

Notes

  • Images are automatically tagged before pushing
  • Docker Hub uses index.docker.io/v1/ for authentication
  • Private registries must be configured with credentials
  • Insecure registries require Docker daemon configuration
  • Edge mode requires active Hawser agent connection
  • Authentication failures provide helpful error messages
  • TLS/certificate errors suggest insecure-registry configuration