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

Preparing and pushing your images

Now that you are logged in to the DTR, you will be able to push your images once you have them properly named/tagged. Images are identified by the following naming properties:

  • The URL of the registry where they're stored
  • The username or namespace within the registry
  • The repository name
  • The image tag

Docker image naming format is as follows: Repo_URL / Namespace /Repo_name:Tag

  • Repo_URL: This is where your Docker DTR is located. The default value is docker.io (Docker Hub).
  • Namespace: This is the organization name or user name. The default value is empty (Docker official images).
  • Repo_name: This is the repository name. It's a required value with no default.
  • Tag: This is the repository tag name. The default value is latest.

Examples from Docker Hub (docker.io) include the following:

  • Repository for official CentOS image with latest tag: CentOS
  • Repository for official Ubuntu image with 16.04 tag: Ubuntu 16.04
  • Microsoft organization, .Net framework image with 3.5-sdk tagmicrosoft/dotnet-framework:3.5-sdk

Examples from my the app-dev organization in my private PoC DTR on AWS include the following:

  • My app image: ec2-xxx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com/app-dev/app-image:v1 
  • My DB imageec2-xxx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com/app-dev/db-image:v1 

As you can tell, my repository has an organization named app-dev and my user is part of that organization. Your Docker Enterprise administrator can set these up; then, you are ready to rename your images. In order to prepare your image, you will need to rename your images in the proper format for storing them in your PoC DTR. For this, we use the docker tag command:

$ docker image tag db-image:v1 {insert-your-DTR-URL-here}/{user-name or org-name}/db-image:v1
$ docker image push {insert-your-DTR-URL-here}/{user-name or org-name}/db-image:v1
$ docker image tag app-image:v1 {insert-your-DTR-URL-here}/{user-name or org-name}/app-image:v1
$ docker image push {insert-your-DTR-URL-here}/{user-name or org-name}/app-image:v1

After the image is pushed, enter you DTR URL into the browser and don't forget the https:// prefix. Then, look at the repositories. You should see something like the screen shown in Figure 16:

Figure 16: PoC Images in the Docker Trusted Registry

Next, we will look at deploying our PoC application to the Docker Enterprise cluster.

主站蜘蛛池模板: 怀仁县| 阳西县| 四川省| 瓮安县| 泗洪县| 大方县| 乌拉特后旗| 阿鲁科尔沁旗| 永胜县| 佛教| 文水县| 平潭县| 封丘县| 乌什县| 彭阳县| 五河县| 祁阳县| 黄平县| 青川县| 东安县| 新绛县| 嘉义县| 吉隆县| 紫阳县| 五峰| 昌江| 吉安县| 德昌县| 鹤山市| 天长市| 霍城县| 昌乐县| 丹东市| 文安县| 荥经县| 潍坊市| 灵武市| 兰考县| 侯马市| 远安县| 喀喇|