Log in docker login Complete the registration and login by executing the docker login command and entering the username, password, and email address. After successful registration, the user authentication information will be saved in the .dockercfg file in the local user directory. Pull the image from the repository docker pull [image name] Search Mirror docker search [image name to search] For example: C:\Users\kunta>docker search centos NAME DESCRIPTION STARS OFFICIAL AUTOMATED centos The official build of CentOS. 5605 [OK] ansible/centos7-ansible Ansible on Centos7 123 [OK] jdeathe/centos-ssh OpenSSH / Supervisor / EPEL/IUS/SCL Repos - … 113 [OK] consol/centos-xfce-vnc Centos container with "headless" VNC session… 99 [OK] centos/mysql-57-centos7 MySQL 5.7 SQL database server 63 imagine10255/centos6-lnmp-php56 centos6-lnmp-php56 57 [OK] tutum/centos Simple CentOS docker image with SSH access 45 centos/postgresql-96-centos7 PostgreSQL is an advanced Object-Relational ... 39 kinogmt/centos-ssh CentOS with SSH 29 We can divide the images into two categories based on whether they are officially provided. One is a base image like centos, called a base or root image. These images are created, verified, supported, and provided by Docker. The other type is an image like ansible/centos7-ansible, which is provided by other unofficial users or organizations. Generally, some features are added to the basic image and then submitted for release for everyone to use. For example, the ansible/centos7-ansible image is maintained by a user or organization named ansible and has a username as a prefix, indicating that it is a repository for a certain user. Automatic creation The Automated Builds feature is very convenient for frequently upgrading programs in the image. Sometimes, a user creates an image and installs a certain software. If a new version of the software is released, the image needs to be manually updated. To configure automatic creation, follow these steps:
Afterwards, you can track the status of each build in the Automatic builds page in DockerHub. Creating and using private repositories, After installing Docker, you can easily build a local private warehouse environment through the official registry image: docker run -d -p 5000:5000 registry When the docker run command is executed, if it is found that there is no corresponding image locally, it will first pull the image and then run it. By default, the repository is created in the /tmp/registry directory of the container. The -v parameter can be used to store the image file in a specified local path. docker run -d -p 5000:5000 -v /opt/data/registry:/tmp/registry registry At this point, a private warehouse service will be started locally, listening on port 5000. Actual Combat First, build a private warehouse on a server machine, whose address is 10.0.2.2:5000. Then try to upload and download the image from the machine. C:\Users\kunta>docker images REPOSITORY TAG IMAGE ID CREATED SIZE hub.c.163.com/kuntang/lingermarket latest c7a70a3810cf 23 months ago 418MB ubuntu2 16.04 1196ea15dad6 2 years ago 336MB ubuntu latest 1196ea15dad6 2 years ago 336MB hub.c.163.com/public/ubuntu 16.04-tools 1196ea15dad6 2 years ago 336MB hub.c.163.com/public/centos 6.7-tools b2ab0ed558bb 2 years ago 602MB Use the docker tag command to mark the image repository as a private repository machine address (the format is: docker tag IMAGE[:TAG] [REGISTRYHOST/]NAME[:TAG]): docker tag ubuntu2:16.04 10.0.2.2:5000/test docker images Use the docker push command to upload the image: docker push 10.0.2.2:5000/test Use curl to view the image of the private warehouse curl http://10.0.2.2:5000/v1/search It can be seen that the mirroring was successful last time. Now you can download this image from any machine that can access the 10.0.2.2 address: docker pull 10.0.2.2:5000/test 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:
|
<<: Use PHP's mail() function to send emails
>>: Detailed explanation of the interaction between React Native and IOS
Nowadays, cross-platform development technology i...
Table of contents Preface What are constructible ...
How to display text overflow? What are your needs...
First, let me explain the version of MySQL: mysql...
background I am learning nodejs recently, and I r...
Solve the problem of not being able to access the...
Yes, CSS has regular expressions too (Amen) Two p...
In the latest version of Ubuntu, users no longer ...
Table of contents Preface 1. Use global unified o...
Label display mode (important) div and span tags ...
Use stored procedures to start transactions when ...
React is an open-source JavaScript library used b...
Ⅰ. Problem description: Use CSS to achieve 3D con...
<br />Structure and hierarchy reduce complex...
Table of contents introduce Prepare Download syst...