Home > System Tutorial > LINUX > The easiest way to understand the docker index service is here

The easiest way to understand the docker index service is here

WBOY
Release: 2024-01-01 18:41:46
forward
654 people have browsed it
Introduction index As the name suggests "index", the index service mainly provides mirror indexing and user authentication functions. When downloading an image, as shown in the figure below, it will first go to the index service for authentication, then find the address of the registry where the image is located and return it to the docker client. Finally, the docker client will download the image from the registry. Of course, during the download During the process, the registry will go to the index to verify the legitimacy of the client token. Different images can be stored on different registry services, and their index information is placed on the index service.

知道什么是docker index服务就看这里。

The implementation of docker warehouse has two operating modes
(1) standalone=true: In this mode, the warehouse itself provides a simple index service. During the implementation process, index only implements a simple index function and does not implement user authentication function
(2) standalone=false: In this mode, you need to configure the index service access point and implement the index service yourself

Interface provided by the index service to the outside world

The REST API interface provided by index is as follows:

PUT /v1/repositories/(namespace)/(repo_name)/
Copy after login

It will be called in the docker push process, and its function is to create a repository. The user password and permissions will be verified before creation. If it is legal, a token will eventually be returned to the docker client

DELETE /v1/repositories/(namespace)/(repo_name)/
Copy after login

Delete a repository, the user password and permissions will be verified before deletion

PUT /v1/repositories/(namespace)/(repo_name)/images
Copy after login

It will be called in the docker push process. Its function is to update the image list corresponding to the repository. The carried token will be verified before updating.

GET /v1/repositories/(namespace)/(repo_name)/images
Copy after login

It will be called in the docker pull process, and its function is to obtain the image list corresponding to the repository. User password and permissions will be verified before obtaining

PUT /v1/repositories/(namespace)/(repo_name)/auth
Copy after login

Verify the legality of the token

GET /v1/users/
Copy after login

docker login will call this interface to verify the legitimacy of the user

POST /v1/users/
Copy after login

docker login will call this interface and can be used to create a user

PUT /v1/users/username/
Copy after login

Used to update user information
For the specific Header, Action, and Response requested by each interface, please refer to here (https://docs.docker.com/reference/api/docker-io_api/)

The above is the detailed content of The easiest way to understand the docker index service is here. For more information, please follow other related articles on the PHP Chinese website!

source:linuxprobe.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template