Home > Article > Operation and Maintenance > How to connect to github in dockerhub to automatically build the image?
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 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
##2. Click connect to configure the connection. In fact, the same is true for Bitbucket3. Click to authorize docker. It is found that the connection has been successfully connected. Now create a project for testing 4. First, create a new dockerfile compilation script project in the GitHub warehouse. Here we take tomcat as an example 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 6, and support multiple branches and multiple versions, create a new branch in the github project
7. Then continue to associate a branch, do multi-branch multi-version compilation, and then associate another branch. 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
Recommended related tutorials:
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!