Push an image Run in API Explorer

POST /images/{name}/push

Push an image to a registry.

If you wish to push an image on to a private registry, that image must already have a tag which references the registry. For example, registry.example.com/myimage:latest.

The push is cancelled if the HTTP connection is closed.

Headers

  • X-Registry-Auth string Required

    A base64url-encoded auth configuration.

    Refer to the authentication section for details.

Path parameters

  • name string Required

    Name of the image to push. For example, registry.example.com/myimage. The image must be present in the local image store with the same name.

    The name should be provided without tag; if a tag is provided, it is ignored. For example, registry.example.com/myimage:latest is considered equivalent to registry.example.com/myimage.

    Use the tag parameter to specify the tag to push.

Query parameters

  • tag string

    Tag of the image to push. For example, latest. If no tag is provided, all tags of the given image that are present in the local image store are pushed.

  • platform string

    JSON-encoded OCI platform to select the platform-variant to push. If not provided, all available variants will attempt to be pushed.

    If the daemon provides a multi-platform image store, this selects the platform-variant to push to the registry. If the image is a single-platform image, or if the multi-platform image does not provide a variant matching the given platform, an error is returned.

    Example: {"os": "linux", "architecture": "arm", "variant": "v5"}

Responses

  • 200

    No error

  • 404 application/json

    No such image

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

  • 500 application/json

    Server error

    Hide response attribute Show response attribute object
    • message string Required

      The error message.

POST /images/{name}/push
curl \
 --request POST 'http://api.example.com/v1.49/images/{name}/push' \
 --header "X-Registry-Auth: string"
Response examples (404)
{
  "message": "Something went wrong."
}
Response examples (404)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}
Response examples (500)
{
  "message": "Something went wrong."
}