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/ubuntu
the
3 Run docker ps
view of the container, here is to get the ID CONTAINER
4 the commit one container
命令: docker commit CONTAINER ID wherein/ubuntu
5 The next step is to log in to a hub account. The command: docker login If successful, the following figure
will be displayed. 6 Push the image just now to your hub and go to the command: docker push wherein/ubuntu:latest
this latest is actually a tag name that will be displayed in the tags of the hub
Note: pay attention here, sometimes the push will time out, it doesn’t matter, it’s fine to push it again
7 Now verify
命令: docker inspect wherein/ubuntu
8 Finally, take a look at whether the tags in your hub have been updated