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

Creating a Docker Hub repository with autobuild

Integrating a Docker Hub repository with autobuild requires connecting your GitHub account to your Docker Hub account and creating the repository itself. Let's get started:

  1. Open https://hub.docker.com/ and navigate to Account Settings. In the Linked Accounts section, click Connect for GitHub provider:

  1. Authorize Docker Hub Builder to access your repositories. At this point, if you need to, you can also grant access to any organization.
  2. After the accounts have been connected, open https://hub.docker.com/ again and click the Create Repository section's + button:

  1. Fill in all the required details. In our case, the name of our repository will be packtpubkubernetesonwindows/nginx-demo-index.
  2. In Build Settings, choose the GitHub icon and select the GitHub repository that you have just created, as shown in the preceding screenshot.

 

  1. Inspect the build settings by clicking Click here to customize the build settings in order to understand what the default configuration is:

  1. The default settings are suitable for our image as we would like to trigger the build whenever new code is pushed to the master branch. A Dockerfile with the name Dockerfile in the root of your GitHub repository should be used for building images.
  2. Click Create & Build to save and immediately start a build based on the current code in the repository.
  3. In Recent Builds, you should see a Pending build of your image:

  1. After a few minutes, the build should finish and the packtpubkubernetesonwindows/nginx-demo-index:latest image should be available. You can verify this by pulling the image using the docker pull packtpubkubernetesonwindows/nginx-demo-index:latest command.

Now, let's take a look at how to easily trigger Docker image builds with a new code commit.

主站蜘蛛池模板: 洪雅县| 攀枝花市| 肃北| 唐海县| 普定县| 金寨县| 宜良县| 富宁县| 建湖县| 壤塘县| 怀远县| 临桂县| 介休市| 萍乡市| 远安县| 宝山区| 衡阳市| 海丰县| 施甸县| 楚雄市| 兴义市| 梁山县| 桓台县| 微山县| 西丰县| 府谷县| 武冈市| 姚安县| 凤台县| 青岛市| 阳城县| 扶沟县| 绥化市| 华宁县| 廊坊市| 枣阳市| 健康| 陕西省| 油尖旺区| 卫辉市| 四会市|