- Hands-On Kubernetes on Windows
- Piotr Tylenda
- 287字
- 2021-06-24 16:54:04
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:
- Open https://hub.docker.com/ and navigate to Account Settings. In the Linked Accounts section, click Connect for GitHub provider:
- Authorize Docker Hub Builder to access your repositories. At this point, if you need to, you can also grant access to any organization.
- After the accounts have been connected, open https://hub.docker.com/ again and click the Create Repository section's + button:
- Fill in all the required details. In our case, the name of our repository will be packtpubkubernetesonwindows/nginx-demo-index.
- In Build Settings, choose the GitHub icon and select the GitHub repository that you have just created, as shown in the preceding screenshot.
- Inspect the build settings by clicking Click here to customize the build settings in order to understand what the default configuration is:
- 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.
- Click Create & Build to save and immediately start a build based on the current code in the repository.
- In Recent Builds, you should see a Pending build of your image:
- 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.
推薦閱讀
- 深入理解Android(卷I)
- Building Modern Web Applications Using Angular
- 兩周自制腳本語言
- MySQL數據庫應用與管理 第2版
- Python測試開發入門與實踐
- 軟件測試項目實戰之性能測試篇
- 跟老齊學Python:輕松入門
- Learn Swift by Building Applications
- Data Analysis with IBM SPSS Statistics
- 名師講壇:Java微服務架構實戰(SpringBoot+SpringCloud+Docker+RabbitMQ)
- Windows Server 2016 Automation with PowerShell Cookbook(Second Edition)
- RabbitMQ Cookbook
- PySpark Cookbook
- Cocos2d-x Game Development Blueprints
- CRYENGINE Game Development Blueprints