Docker Hub

Now that we have a working Docker image we want to automate the building process, so it automatically builds and publishes the image with every new code change.

Step 1: Register in Docker Hub

Just click in Sing up and fill up the following form:

Step 2: Create a new Repository

Click in Create Repository + and name it accordingly, under the Build Settings section select the Connected option with a GitHub logo to autobuild a new image with every git push event as long as it matches the build rules, which in our case are the default ones (the Dockerfile is located in the root directory of the project).

Click in Create and Build to start the first build of the image, then in the Builds tab we can see the process of the build and its logs as shown in the screenshot below:

Now with every new change detected in our GitHub repository a new build will be triggered in Docker Hub.