Last active
August 6, 2018 08:12
-
-
Save PyPatel/9e7909598d1a97917e7d6355e68b5ac4 to your computer and use it in GitHub Desktop.
docker installation on Ubuntu 14.04 LS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Installation Instructions for Ubuntu | |
#The simplest way to get docker, other than using the pre-built application image, is to go with a 64-bit Ubuntu 14.04 VPS | |
#Update your droplet: | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
#Make sure aufs support is available: | |
sudo apt-get install linux-image-extra-`uname -r` | |
#Add docker repository key to apt-key for package verification: | |
sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
#Add the docker repository to Apt sources: | |
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list | |
#Update the repository with the new addition: | |
sudo apt-get update | |
#Finally, download and install docker: | |
sudo apt-get install docker-engine | |
#Ubuntu's default firewall (UFW: Uncomplicated Firewall) denies all forwarding traffic by default, which is needed by docker. | |
#Enable forwarding with UFW: | |
#Edit UFW configuration using the nano text editor. | |
sudo nano /etc/default/ufw | |
#Scroll down and find the line beginning with DEFAULTFORWARDPOLICY. | |
#Replace: | |
DEFAULT_FORWARD_POLICY="DROP" | |
#With: | |
DEFAULT_FORWARD_POLICY="ACCEPT" | |
#Press CTRL+X and approve with Y to save and close. | |
#Finally, reload the UFW: | |
sudo ufw reload | |
#For a full set of instructions, check out docker documentation for installation. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment