Home  >  Article  >  Operation and Maintenance  >  How to connect to github in dockerhub to automatically build the image?

How to connect to github in dockerhub to automatically build the image?

coldplay.xixi
coldplay.xixiOriginal
2020-07-22 15:33:064039browse

How to automatically build the image by connecting to github in dockerhub: first click connect to configure the connection, and click to authorize docker; then create a new project and select the warehouse; then create and associate a branch; finally wait for automatic compilation .

How to connect to github in dockerhub to automatically build the image?

How to automatically build the image by connecting github within dockerhub:

#1. First configure dockerhub to connect to GitHub, click link to github will jump to the next interface

How to connect to github in dockerhub to automatically build the image?

##2. Click connect to configure the connection. In fact, the same is true for Bitbucket

How to connect to github in dockerhub to automatically build the image?

3. Click to authorize docker. It is found that the connection has been successfully connected. Now create a project for testing

How to connect to github in dockerhub to automatically build the image?

How to connect to github in dockerhub to automatically build the image?

4. First, create a new dockerfile compilation script project in the GitHub warehouse. Here we take tomcat as an example

How to connect to github in dockerhub to automatically build the image?

5. Then go to dockerhub to create a new project and choose your own warehouse, and then choose yourself project, and then set up branch

How to connect to github in dockerhub to automatically build the image?

6, and support multiple branches and multiple versions, create a new branch in the github project

How to connect to github in dockerhub to automatically build the image?

7. Then continue to associate a branch, do multi-branch multi-version compilation, and then associate another branch.

How to connect to github in dockerhub to automatically build the image?

How to connect to github in dockerhub to automatically build the image?

8. After that, the dockerfie in the GitHub project will be automatically compiled for image compilation. The automatic compilation is a bit slow, so you can wait slowly. After a few minutes, you will see the log and prompt that the compilation was successful

How to connect to github in dockerhub to automatically build the image?

Recommended related tutorials:

docker tutorial

The above is the detailed content of How to connect to github in dockerhub to automatically build the image?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn