Push an image from specific host to a a specific registry

post

/api/v2/images/{repo_id:.*}/hosts/{host_id}/push

Use this endpoint to push an image from specific host to a Docker registry. Note that the optional container tag must be preceded by a colon (:); for example, oraclelinux:6.6

Request

Supported Media Types
Path Parameters
Body ()
Body parameters
Root Schema : schema
Type: object
Show Source
Security
Back to Top

Response

Supported Media Types

200 Response

200 Response
Body ()
Root Schema : schema
Type: array
Show Source
Nested Schema : items
Type: object
Show Source

Default Response

Error Payload
Body ()
Root Schema : schema
Type: array
Show Source
Back to Top

Examples

The following example shows how to push a specific image to a Docker registry to a specific Oracle Container Cloud Service host. You perform this task by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.

Note: The command in this example uses the URL structure https://rest_server_url/resource-path, where rest_server_url is the manager node for the Oracle Cloud Container instance. See Send Requests for the appropriate URL structure to use for Oracle Public Cloud.

cURL Command

curl -sk 
     -X "POST" 
     -H "Authorization: Bearer b39f09c71c297f1d" 
     "https://rest_server_url/api/v2/images/oraclelinux:6.6/hosts/host_id/push"

In this example:

  • oraclelinux is the repository in the registry and 6.6 is the optional container tag. If you do not include the tag, then Oracle Container Cloud Service assumes the value of the tag is latest.

  • Replace host_id with the actual value. If you do not know the host_id, then submit a GET request to the /api/hosts/ endpoint.

Example of Response Body

{
  "task_id": "dc344538-0b69-45ff-a0ef-2e7a6000a509"
}
Back to Top