Docker provides the following four types of Api:docker Registry API Docker Hub API Docker API Docker Remote API for ease of use
This article is designed to explore the Docker Registry API, the Docker Hub API, and the OAuth API.
The Docker API is primarily used to communicate messages between Docker's official Index, Registry, and Client.
The Docker remote API is an API for controlling the host Docker server, equivalent to the Dockers command-line client.
Docker Registry API
The Docker Registry API is a REST API designed to simplify the storage of mirrors and warehouses, and these APIs do not involve user accounts and user authentication.
Remove the mirror layer:
Get/v1/images/(image_id)/layer
To insert a mirrored layer:
Put/v1/images/(image_id)/layer
To retrieve the image:
Get/v1/images/(image_id)/json
To retrieve the root image of a mirror:
Get/v1/images/(image_id)/ancestry
Gets all the tags for the specified library:
Get/v1/repositories/(namespace)/(repository)/tags
Gets the specified label for the specified library:
Get/v1/repositories/(namespace)/(repository)/tags/(tag*)
To delete a label:
Delete/v1/repositories/(namespace)/(repository)/tags/(tag*)
Registry status Check:
Get/v1/_ping
Docker Hub API
The Docker Hub API is a REST API designed for Docker hub. The Docker Hub (i.e. Index) uses a checksum public namespaces to store account information, authenticate accounts, and authorize accounts. The API also allows the operation of the relevant user repository and library repository. operation of a special warehouse
Create a new warehouse
Put/v1/repositories/(Repo_name)/
Delete an existing warehouse
Delete/v1/repositories/(Repo_name)/
Update a warehouse image
Put/v1/repositories/(Repo_name)/images
Get a warehouse image
Get/v1/repositories/(Repo_name)/images
Certification
Put/v1/repositories/(Repo_name)/auth
All of these are special warehouse operations, the following is an open API for ordinary users.
The Special library warehouse and user warehouse is the difference between the Library warehouse is the official warehouse, you can directly use Ubuntu name to do repo name, and the translator can only use Qiuker521/ubuntu as repo name. operations for ordinary users
Create a new user repository
Put/v1/repositories/(namespace)/(Repo_name)/
Delete an existing warehouse
Delete/v1/repositories/(namespace)/(Repo_name)/
Update image
Put/v1/repositories/(namespace)/(Repo_name)/images
Get Mirror
Get/v1/repositories/(namespace)/(Repo_name)/images
User authentication
Get/v1/users
Create a new user
Post/v1/users
Update user Information
put/v1/users/(username)/