Skip to content

Instantly share code, notes, and snippets.

@harto
Last active August 29, 2015 13:56
Show Gist options
  • Save harto/9183878 to your computer and use it in GitHub Desktop.
Save harto/9183878 to your computer and use it in GitHub Desktop.
Install Docker
#!/bin/bash
set -e
set -x
# Install Docker package
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sh -c 'echo deb https://get.docker.io/ubuntu docker main >/etc/apt/sources.list.d/docker.list'
apt-get -y update
apt-get -y install linux-image-extra-$(uname -r)
apt-get -y install lxc-docker
# Give Docker lots of space
echo 'DOCKER_OPTS="-g /mnt/docker"' >/etc/default/docker
service docker restart
# Let `ubuntu` run Docker commands
adduser ubuntu docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment