Using Docker CE 17.05 Edge on Travis CI
For the last year, we’ve been using the wonderful docker-sync
utility at work to improve performance on Docker for Mac.
For a veriety of reasons which I’ll get into another time, we’re switching to the new, native :cached
implementation available in Docker 17.05 (Edge). Installing 17.05 Edge on Mac is straightforward; here are the steps for using this version on Travis CI.
In your .travis.yml
file, add the following to pre_install
:
pre_install:
- docker --version
- sudo apt-get remove docker-engine
- sudo apt-get -y install apt-transport-https ca-certificates curl
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"
- sudo apt-get update
- sudo apt-get -y install docker-ce=17.05.0~ce-0~ubuntu-trusty
- docker --version
You can now use the same docker-compose.yml
file for both Docker for Mac and Travis CI!