Skip to content

Instantly share code, notes, and snippets.

@aurelijusrozenas
Last active January 26, 2017 09:08
Show Gist options
  • Save aurelijusrozenas/22622e71f414b2d0438f7ee28b937209 to your computer and use it in GitHub Desktop.
Save aurelijusrozenas/22622e71f414b2d0438f7ee28b937209 to your computer and use it in GitHub Desktop.
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
# may not work, then add manually
echo "deb https://apt.dockerproject.org/repo ubuntu-yakkety main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt install docker-engine
# OR
# but this may contain older version
sudo apt-get install docker.io
# add user to docker groups
sudo usermod -aG docker infro
# testing without logout
newgrp docker
# install up to date docker-compose
# https://gist.github.com/wdullaer/f1af16bd7e970389bad3
# Install docker-compose
COMPOSE_VERSION=`git ls-remote https://github.com/docker/compose | grep refs/tags | grep -oP "[0-9]+\.[0-9]+\.[0-9]+$" | tail -n 1`
sudo sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
sudo chmod +x /usr/local/bin/docker-compose
sudo sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose"
# possible problems: ubuntu 16.10 works, was not working on 16.04
# change storage engine as aufs is not supported on ubuntu, use overlay
# https://github.com/docker/docker/issues/23347
vi /etc/docker/daemon.json
{
"storage-driver": "overlay"
}
# machine
# run as root
curl -L https://github.com/docker/machine/releases/download/v0.8.2/docker-machine-`uname -s`-`uname -m` >/usr/local/bin/docker-machine && chmod +x /usr/local/bin/docker-machine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment