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

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.

主站蜘蛛池模板: 罗甸县| 平乡县| 内江市| 大化| 加查县| 五峰| 吴堡县| 鹿泉市| 玉树县| 玛沁县| 新昌县| 德钦县| 马鞍山市| 铁岭市| 会东县| 东山县| 唐山市| 靖江市| 彝良县| 巴林左旗| 凯里市| 桦南县| 东源县| 吴旗县| 凉城县| 会昌县| 柘荣县| 越西县| 浪卡子县| 长泰县| 衡南县| 桑日县| 松潘县| 祁连县| 凤阳县| 随州市| 正安县| 涟水县| 沙雅县| 定西市| 镇安县|