官术网_书友最值得收藏!

Uploading images to the Docker registry

Now we know how to search, pull, remove, save, load, and list available images. The last piece we are missing is how to push images back to Docker Hub or a private registry.

To upload an image to Docker Hub, we need to do a few tricks and follow these steps:

  1. Log in to Docker Hub:
$ docker login
Username: #Enter your username here
Password: #Enter your password here
Login Succeeded
  1. Copy the Docker image you want to push to a different path in the Docker repository on your server:
$ docker tag httpd:latest flashdumper/httpd:latest
Note that flashdumper is your Docker Hub username.
  1. Finally, push the copied image back to Docker Hub:
$ docker push flashdumper/httpd:latest

The output of the preceding command will be as shown in the following screenshot:

Now the image is pushed to your Docker Hub and available for anyone to download. 

$ docker search flashdumper/*

The output of the preceding command will be as shown in the following screenshot:

You can check the same result using a web browser. If you go to https://hub.docker.com/ you should be able to see this httpd image available under your account:

Docker Hub account images
主站蜘蛛池模板: 葵青区| 扶风县| 承德市| 新蔡县| 彰化市| 图们市| 冀州市| 扶余县| 通辽市| 绥江县| 陆川县| 攀枝花市| 静安区| 小金县| 武穴市| 莆田市| 桐城市| 苏尼特左旗| 三都| 千阳县| 阿克苏市| 永昌县| 江永县| 大连市| 蕉岭县| 雷波县| 德令哈市| 榕江县| 大英县| 江陵县| 禹城市| 崇州市| 拜城县| 九龙城区| 寻乌县| 嘉兴市| 平远县| 华宁县| 瑞丽市| 桂平市| 江安县|