Why switch from building Docker images in each Travis-CI build to pulling form the Docker Hub?

  1. The docker build step can often times be the slowest step in a build process. In this example case (Aptly_cli), approximately 6 minutes can be shaved off.

  2. Gain full control over Docker image being used for testing by leveraging a central storage platform such as Docker Hub

In this case I use a Rakefile to managed the Docker commands. A simple update to Rakefile with the 'pull' command needed will do the trick.

https://github.com/sepulworld/aptly_cli/pull/85/files#diff-52c976fc38ed2b4e3b1192f8a8e24cff

Here is it in action, making an update to the Dockerfile and pushing to the Docker Hub for later use by Travis-CI.

Then apply the changed build step in the .travis-ci.yml

https://github.com/sepulworld/aptly_cli/pull/85/files#diff-354f30a63fb0907d4ad57269548329e3

POOF! Rocking out some faster build times now.