In this topic, we are going to look at how automated builds work at a high level, and how to publish an image via the push method on Docker Hub.
In Docker Hub, we have two ways to publish images: via a simple push method or via an automated build. In this topic, we will cover automated builds. First, we will look at the flow of an automated build. In this example, we will be using GitHub, but you can also use Bitbucket. So, the first thing that we need to do is link our Docker Hub account to our GitHub account. This is done by navigating to Settings | Linked Accounts & Services:
Just follow the prompts to link the accounts.
Once this is completed, let's go to our GitHub account and create a repo. I am going to use the one that I have already set up:
As you can see in the preceding screenshot, the repo contains a Dockerfile. Now, let's looks at the same repo except Docker Hub:
After this, we will look at the Build Details tab:
So, how does that...