How to Install Latest Docker on Ubuntu server


This tutorial will guide you to install docker on a ubuntu server.

  1. Update the server

     sudo apt-get update -y
  2. Install https respository packages.

     sudo apt-get install -y --no-install-recommends \
     apt-transport-https \
     ca-certificates \
     curl \
  3. Add GPG key

     curl -fsSL | sudo apt-key add -
  4. Verify key id

      apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D
  5. Add docker repository.

     sudo add-apt-repository \
     "deb \
     ubuntu-$(lsb_release -cs) \
  6. Update and install docker

     sudo apt-get update
     sudo apt-get -y install docker-engine
  7. Check the docker service status

     sudo service docker status
  8. Finally, add your user to docker group and restart the terminal. So that you can use docker commands without sudo

     sudo usermod -aG docker <user-name>

(Lisa Mathew) #3