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

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.

主站蜘蛛池模板: 桂林市| 大邑县| 鹤岗市| 饶平县| 石渠县| 宝鸡市| 夏河县| 邹平县| 辰溪县| 老河口市| 连江县| 托克托县| 梅河口市| 图们市| 乐安县| 寻乌县| 宿州市| 克山县| 三穗县| 长垣县| 南陵县| 宜良县| 清水县| 雷山县| 安达市| 江孜县| 东辽县| 元阳县| 临颍县| 玉门市| 方山县| 渑池县| 夹江县| 广平县| 沾化县| 古田县| 镇安县| 韩城市| 秦皇岛市| 古蔺县| 道孚县|