-
Notifications
You must be signed in to change notification settings - Fork 6
Dockerhub Autobuilds
Dockerhub can automatically build container images of your Github repositories on push. Although convenient, this is not the preferred solution because only x86_64 builds are supported, and neither is a dark theme.
Recommended solution is to use Github Actions: https://github.com/FNNDSC/cookiecutter-chrisapp/wiki/Automatic-Builds
First, create a Docker Hub account on https://hub.docker.com/ if you don't already have one.
Once you log in, click the Create Repository + button.
Use the same as the Github repo. Then, click on the Github icon towards the bottom (it also should say "Connected" under the icon) and select your Github repository.
Keep the default rule which builds master
branch as :latest
.
Add a second rule which targets tags. It should look like the "Match versions" example: Source Type=Tag, Source=/^[0-9.]+$/
. Docker Tag={sourceref}.
In this example, a Dockerhub autobuild is triggered for fnndsc/pl-surfaces-fetus:1.0.2
when a git tag 1.0.2
is pushed to the Github repository https://github.com/FNNDSC/pl-surfaces-fetus
For more information on Automated Builds, please visit https://docs.docker.com/docker-hub/builds/#configure-automated-build-settings
Use continuous integration (CI) for specialized builds. For example, to create a manifest list to support multiple CPU architectures.
Automation servers provide CI:
- Gitlab
- Travis
- Jenkins
- Github Actions (new)
Most FNNDSC CI are hosted on Travis.
You can find an example on how to use Travis and Docker buildx here: fnndsc/ubuntu-python3/.travis.yml
CAUTION: disable Dockerhub builds if using a different CI.