IoTGateway/DockerHub
This article tells you how to create an automated build on DockerHub.
Contents
Introduction
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.
4-1. Create auto-build for GitHub.
4-2. Select docker-images repository.
4-3. Fill in Repository Namespace & Name.
Note: The repository name is the same with your <new branch> name.
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 README.md 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!