How to Upload Docker Image to docker hub

background

Many images pulled down from docker hub can be customized to suit their own images by modifying configuration files and other operations. You can use your own images in the future. Therefore, you need to upload them to docker hub, and you can manage and maintain your own docker images like code in the future. 

1. Register a docker hub account

2. Create a warehouse on docker hub


Created successfully as shown below:

3. The docker hub account is authenticated locally

docker local login

docker login

4. Commit the container into an image

docker tag <existing-image> <hub-user>/<repo-name>[:<tag>]
docker commit 277e80820516 jerrymouseli/wvp_lirj:0322

The tag here is not specified is latest.

sha256 is the check code of the image file.

5. docker push image to docker hub repository

docker push<hub-user>/<repo-name>:<tag>
docker push jerrymouseli/wvp_lirj:0322

6. Verify

6.1 Command Verification

docker inspect jerrymouseli/wvp_lirj:0322

6.2 Online warehouse verification


Translated from this article: https://www.cnblogs.com/JerryMouseLi/p/16040807.html

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *