Jump to: navigation, search

This article tells you how to create an automated build on DockerHub.


DockerHub is a cloud-based registry service which allows you to link to code repositories (e.g. GitHub), build your Docker images and test them, stores manually pushed images, etc.

Currently, we have many Docker images on DockerHub. In the section below, I will show you how to upload yours to the official registry.

Upload Dockerfile to GitHub

1. Register a GitHub account.

2. Join Advantech organizations.

3. Upload your Dockerfile to docker-images repository.

3-1. Create a new branch, e.g. u12.04-imx6LBV3.

Note: The naming rule is "<ubuntu version>-<project version>".


3-2. Add your Dockerfile in specific path, e.g. advrisc/u12.04-imx6LBV3

Note: The path is the name combining advrisc and <new branch>.


Set up DockerHub

1. Register a DockerHub account.

2. Join Advantech RISC organizations.

3. Link GitHub & DockerHub accounts. Dockerhub1.png

4. Create automated build. Dockerhub2.png

4-1. Create auto-build for GitHub.

4-2. Select docker-images repository. Dockerhub3.png

4-3. Fill in Repository Namespace & Name.

Note: The repository name is the same with your <new branch> name.


4-4. Configure Build Settings Dockerhub5.png

Note: Here we set trigger for both Branch & Tag types. In other words, 
when the branch on GitHub is pushed, DockerHub will trigger to build latest image.
When a tag is added on GitHub, DockerHub will trigger to build tag name image.

Trigger auto-build & Tag the image

1. Go back GitHub to update for image information.

Note: This step will trigger auto-build for latest image!


2. If anything is good, add a tag for your Dockerfile.

Note: This step will trigger auto-build for tag name image!


3. Check the status of auto-build on DockerHub. Dockerhub6.png