Detailed explanation of the use of DockerHub image repository

Detailed explanation of the use of DockerHub image repository

Previously, the images we used were all pulled from the DockerHub public repository. We also learned how to make our own images, but backing up, restoring and migrating images through tar packages is not particularly friendly for team collaboration development. We can also push the images to the DockerHub repository for easy use.

Tips: If the built image contains project data, it is recommended to use a private repository.

Register an account

Official website: https://hub.docker.com/

Login Account

Use the docker login command to enter your account and password to log in to DockerHub.

Push the image to the warehouse

To facilitate testing, we pull the hello-world image locally and then upload it to the DockerHub repository.

First set the tag docker tag local-image:tagname new-repo:tagname for the image;

Then push the image to the repository docker push new-repo:tagname .

docker tag hello-world:latest mrhelloworld/test-hello-world:1.0.0
docker push mrhelloworld/test-hello-world:1.0.0 

View Warehouse

Pull the image

Test whether the image can be pulled by docker pull mrhelloworld/test-hello-world:1.0.0 .

Log out

Exit DockerHub using the docker logout command.

[root@localhost ~]# docker logout
Removing login credentials for https://index.docker.io/v1/

This is the end of our learning on how to use the DockerHub image repository. Considering network reasons, the speed of downloading and uploading images from DockerHub may be slow. In addition, the Docker images used in production may contain our code, configuration information, etc., which we do not want to be obtained by outsiders, so only developers on the intranet are allowed to download them. How to solve it? This can be achieved by building a private image repository. Let's learn how to build a Docker private image repository below.

This is the end of this article about the detailed use of DockerHub image repository. For more information about the use of DockerHub image repository, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed explanation of using Alibaba Cloud image repository to build foreign Docker images
  • Implementation of Docker configuration modification of Alibaba Cloud image repository
  • How to implement Docker Registry to build a private image warehouse
  • Steps for Docker to build its own local image repository
  • How to use Alibaba Cloud image repository with Docker
  • How to use domestic image warehouse for Docker

<<:  The practical process of login status management in the vuex project

>>:  Detailed explanation of MySQL clustered index and non-clustered index

Recommend

Do you know all 24 methods of JavaScript loop traversal?

Table of contents Preface 1. Array traversal meth...

Analysis of Sysbench's benchmarking process for MySQL

Preface 1. Benchmarking is a type of performance ...

Rules for registration form design

I finished reading "Patterns for Sign Up &...

How to avoid garbled characters when importing external files (js/vbs/css)

In the page, external files such as js, css, etc. ...

CSS mimics remote control buttons

Note: This demo is tested in the mini program env...

Notes on configuring multiple proxies using vue projects

In the development process of Vue project, for th...

Summary of principles for writing HTML pages for emails

Since HTML email is not an independent HOST page o...

Packetdrill's concise user guide

1. Packetdrill compilation and installation Sourc...

Vue Router vue-router detailed explanation guide

Chinese documentation: https://router.vuejs.org/z...

JavaScript manual implementation of instanceof method

1. Usage of instanceof instanceof operator is use...

Webpack loads css files and its configuration method

webpack loads css files and its configuration Aft...

W3C Tutorial (1): Understanding W3C

W3C, an organization founded in 1994, aims to unl...

Example of how to generate random numbers and concatenate strings in MySQL

This article uses an example to describe how MySQ...