Pushing Images to the Registry
In this step, you will learn how to push a Docker image to the magical maritime trading registry.
- Tag the
alpine
with the usename of your Docker Hub
account:
docker tag alpine < your-docker-username > /my_alpine:latest
If you use the private registry, you can tag
the image with magical maritime trading registry as the prefix:
docker tag alpine magical_maritime_trading.registry/myimage:latest
In the following steps you just need to know how to do this, if you have a real registry server, you must execute docker logout
in the terminal to log out from Docker Hub
and re-login to your registry server.
- Push the tagged image to the
Docker Hub
:
docker push < your-docker-username > /my_alpine:latest
If you use the private registry, you can push the tagged image to the registry use following command:
## Please replace the registry server with your real registry server, or else the command will fail.
docker push magical_maritime_trading.registry/myimage:latest
- Upon successful push, a digest for the image will be displayed.
Tips
The magical_maritime_trading.registry
is a virtual registry server address, if you have a real registry server address, please replace it with the real one.