-
Notifications
You must be signed in to change notification settings - Fork 19
/
.travis.updateDocker.sh
28 lines (22 loc) · 977 Bytes
/
.travis.updateDocker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
# Managing Docker & Docker Compose versions on Travis
# https://graysonkoonce.com/managing-docker-and-docker-compose-versions-on-travis-ci/
DOCKER_VERSION=1.13.1-0~ubuntu-trusty
DOCKER_COMPOSE_VERSION=1.11.2
# starting versions
docker --version
docker-compose --version
# list docker-engine versions
apt-cache madison docker-engine
# upgrade docker-engine to specific version
# EDIT: it turns out that my test passed without updating docker-engine .. so skipping this
#- sudo apt-get -o Dpkg::Options::="--force-confnew" install -y docker-engine=${DOCKER_VERSION}
# reinstall docker-compose at specific version
# https://docs.docker.com/compose/install/
sudo rm -f /usr/local/bin/docker-compose
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
# show versions again
docker --version
docker-compose --version