Skip to content

Commit

Permalink
Cleanup our scripts just slightly.
Browse files Browse the repository at this point in the history
  • Loading branch information
envygeeks committed Jun 19, 2017
1 parent 80339b3 commit abcebf9
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions script/install
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
[ "$DEBUG" = "true" ] && set -x
set -e

if [ "$CI" = "true" ]; then
sudo apt-get update \
-o Dir::Etc::sourceparts="-" \
update-docker() {
# Only update our Docker sources, that's it.
sudo apt-get update -o Dir::Etc::sourceparts="-" \
-o Dir::Etc::sourcelist="/etc/apt/sources.list.d/docker.list" \
-o APT::Get::List-Cleanup="0"
}

sudo apt-get install \
--assume-yes --only-upgrade \
upgrade-docker() {
# Only upgrade Docker, nothing else, if we update.
sudo apt-get install --assume-yes --only-upgrade \
-o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" \
docker docker-engine
}

if [ "$CI" = "true" ]; then
sudo mkdir -p /etc/docker
# We need experimental so we can squash our images.
update-docker && upgrade-docker
printf "{\n \"experimental\": true\n}\n" | sudo tee /etc/docker/daemon.json
sudo service docker restart
fi

0 comments on commit abcebf9

Please sign in to comment.