Push an image Run in API Explorer
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
-
A base64url-encoded auth configuration.
Refer to the authentication section for details.
Path parameters
-
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 toregistry.example.com/myimage
.Use the
tag
parameter to specify the tag to push.
Query parameters
-
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. -
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"}
curl \
--request POST 'http://api.example.com/v1.49/images/{name}/push' \
--header "X-Registry-Auth: string"
{
"message": "Something went wrong."
}
{
"message": "Something went wrong."
}
{
"message": "Something went wrong."
}
{
"message": "Something went wrong."
}