Docker installation

Ubuntu 18.04

Docker Community Edition

TL;DR See Script

  1. Remove any older installations of Docker that may be on the system

sudo apt remove docker docker-engine docker.io
  1. Add Docker’s repository

sudo apt install apt-transport-https ca-certificates curl software-properties-common
  1. Add Docker’s GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  1. Add the stable Docker repository

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  1. Install Docker CE

sudo apt update
sudo apt install docker-ce
  1. Get rid of sudo (takes effect after user logging out)

sudo usermod -aG docker $USER
  1. Check that the installation was successful

docker-compose

https://docs.docker.com/compose/install/

Docker for Non-root User

https://www.thegeekdiary.com/run-docker-as-a-non-root-user/

References

Last updated

Was this helpful?