With the autobuild setup created in the previous section, triggering a new Docker image build is as simple as committing new code to your GitHub repository. In order to do that, you have to do the following:
Introduce a change to the source code for the image on GitHub; for example, modify the index.html file:
<!DOCTYPE html> <html> <head> <title>Hello World!</title> </head> <body> <h1>Hello World from nginx container! This is a new version of image for autobuild.</h1> </body> </html>
If your build fails, you can always inspect the Docker build logs in the build details and Build logs tab.
After the build succeeds, verify your image by running a new container on your Windows machine:
docker run -it --rm ` -p 8080:80 ` packtpubkubernetesonwindows/nginx-demo-index:latest
The image will be automatically pulled from the Docker Hub repository. Navigate to http://localhost:8080 in your web browser. You should see the following output:
Congratulations – you have successfully created and triggered a Docker image autobuild on Docker Hub! In the next section, you will learn how to create a similar setup for Windows-based images using Azure Container Registry.