How Docker uploads the image to the docker hub

1 First, you have to prepare a hub account, go to https://hub.docker.com to register!

2 In the hub where a new warehouse, which is similar to github over there ... create ---> create repository(to create a knowledge base) and then casually put forward a name, called ubuntu I am here right path so that wherein/ubuntuthe

3 Run docker psview of the container, here is to get the ID CONTAINER
Insert picture description here
4 the commit one container

命令: docker commit CONTAINER ID wherein/ubuntu

Insert picture description here
5 The next step is to log in to a hub account. The command: docker login If successful, the following figure
Insert picture description here
will be displayed. 6 Push the image just now to your hub and go to the command: docker push wherein/ubuntu:latestthis latest is actually a tag name that will be displayed in the tags of the hub

Insert picture description here
Note: pay attention here, sometimes the push will time out, it doesn’t matter, it’s fine to push it again
Insert picture description here
7 Now verify

命令: docker inspect wherein/ubuntu

Insert picture description here
8 Finally, take a look at whether the tags in your hub have been updated
Insert picture description here

Guess you like

Origin blog.csdn.net/BruceLiu_code/article/details/114298951