In the middle of upgrading a bunch of servers from Ubuntu 14.04 to Ubuntu 16.04. One of the services we utilize heavily is Docker. So, below you’ll find a simple guide to getting Docker CE running on Ubuntu 16.04. I won’t go into details on usage because there are so many guides out there already.
Add the GPG key for the Official Docker Repo:
1 |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - |
Add the repo to APT sources:
1 |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |
Update the package databaes to contain the docker repo:
1 |
sudo apt-get update |
Need to make sure it’s installing from Docker repo instead of the default Ubuntu repo:
1 |
apt-cache policy docker-ce |
Install Docker:
1 |
sudo apt-get install -y docker-ce |
Set it to start on boot:
1 |
sudo systemctl enable docker |
If you don’t want to have to sudo everytime you want to run a docker command, add your user to the docker group:
1 |
sudo usermod -aG docker YOUR_USERNAME |