1 First you have to prepare a hub account, go to https://hub.docker.com register it!
2 Create a new warehouse at the hub, which is similar to the one on GitHub. Creation---> Create repository (Creating a knowledge Base) and then just a name, I'll call it Ubuntu, so the path is Wherein/ubuntu.
3 Run Docker PS View container, here is to get to container ID
4 Commit a container command: Docker commit CONTAINER ID Wherein/ubuntu
5 The next step is to login to a hub account command: Docker Login If successful displays
6 Push the mirror to your hub to order: Docker push Wherein/ubuntu:latest This latest is actually a tag name that will be displayed in the hub's tags
Note: Note here, sometimes push will time out, it's okay, push it again.
7 now verify the command: Docker inspect Wherein/ubuntu
8 finally see if the tags in your hub have a new update
Well, it seems to be a success!
How Docker uploads the image to the Docker hub