Skip to content

Instantly share code, notes, and snippets.

@jniltinho
Created December 9, 2016 15:13
Show Gist options
  • Select an option

  • Save jniltinho/f0fd0c0d17ff872ef3ed73c49711064c to your computer and use it in GitHub Desktop.

Select an option

Save jniltinho/f0fd0c0d17ff872ef3ed73c49711064c to your computer and use it in GitHub Desktop.
#!/bin/bash
### Install Docker 1.12.3 on Ubuntu 16.04 64Bits
# Check if user has root privileges
if [[ $EUID -ne 0 ]]; then
echo "You must run the script as root or using sudo"
exit 1
fi
### installs add-apt-repository
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates
sudo apt-key adv --recv-keys --keyserver hkp://ha.pool.sks-keyservers.net:80 58118E89F3A912897C070ADBF76221572C52609D
sudo add-apt-repository "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -sc) main"
sudo apt-get update
sudo apt-get -y install linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get -y install docker-engine
sudo service docker start
sudo docker run hello-world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment