Docker queries or obtains images in a private registry, using docker search 192.168.1.8:5000 The command did not work after testing. solve: 1. Get the image of the warehouse class: [root@shanghai docker]# curl -XGET http://192.168.1.8:5000/v2/_catalog {"repositories":["nginx"]} 2. Get the tag list of a certain image: [root@shanghai docker]# curl -XGET http://192.168.1.8:5000/v2/image_name/tags/list {"errors":[{"code":"NAME_UNKNOWN","message":"repositoryname not known toregistry","detail":{"name":"image_name"}}]} [root@shanghai docker]# curl -XGET http://192.168.1.8:5000/v2/nginx/tags/list {"name":"nginx","tags":["latest"]} [root@shanghai docker]# Reference: https://stackoverflow.com/questions/23733678/how-to-search-images-from-private-1-0-registry-in-docker PS: View all tags of images in the Docker image repository #!/bin/sh repo_url=https://registry.hub.docker.com/v1/repositories image_name=$1 curl -s ${repo_url}/${image_name}/tags | json_reformat | grep name | awk '{print $2}' | sed -e 's/"//g' In fact, the implementation method is to query through the restful API of the image repository, then simply process the returned json result and print it out. The above script is implemented to query only from hub.docker.com. If you use other warehouses, you can modify the warehouse URL as needed. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to pull the docker image to view the version
>>: Detailed steps to install MySql 5.7.21 in Linux
1. Download VMware Workstation 64 version https:/...
<br />Adding pictures reasonably can make a ...
This article shares the specific code of jQuery t...
1. Add a user . First, use the adduser command to...
Table of contents 1. Array.at() 2. Array.copyWith...
1. Top-level usage 1. Install cnpm npm i -g cnpm ...
When we check the source code of many websites, w...
Preface In the previous article, we mainly learne...
what is it? GNU Parallel is a shell tool for exec...
As shown below: select a1,a2,a1+a2 a,a1*a2 b,a1*1...
This article example shares the specific code for...
Selector Grouping Suppose you want both the h2 el...
First, download the installation package from the...
1. Download MySQL Log in to the MySQL official we...
This article shares the specific code of the appl...