Use nightli.es to rebuild N docker images on hub.docker.com, setup takes less than two minutes! ⚡
Since I originally wrote this guide, Travis-CI has added cron jobs. This means, that you no longer need to enable and register with nightli.es. The entire setup can be done with Travis-CI alone.
I use this to rebuild GCC trunk in a docker container on a nightly basis. If you're interested, please take a look at my automated docker hub setup.
Travis-CI is great but long builds can time out, which is a giant PITA. Docker to the rescue! By using docker with Travis-CI you get to skip long builds for dependencies. While Travis-CI itself can be used to build docker images, some will time out before the build can complete. However, Docker Hub can be used to rebuild docker images (and it's harder to time out here) BUT nightli.es can only be used to trigger Travis-CI builds.... hmmmmm :thinking: what to do? Nightly-docker-rebuild to the rescue! :tada:
- Fork
- Clone:
git clone https://github.com/<your_username>/nightly-docker-rebuild && cd nightly-docker-rebuild
- Enable and setup Travis-CI (through the online UI or by following the following steps)
[sudo] gem install travis
travis login
travis enable
- Get your Docker Hub project end point URL and token from
https://hub.docker.com/r/<USER>/<REPO>/~/settings/automated-builds/
- create encrypted Travis-CI variable to store private end point and
token:
travis env set DH_END_POINT_1 https://registry.hub.docker.com/u/<USER>/<REPO>/trigger/<TOKEN>/
- Repeat for an additional nighly builds you want to setup and
increment the number on
DH_END_POINT_<N>
- Go to nightli.es and enable
nightly-docker-rebuild
after logging in