How to install Docker

There are two ways to install Docker CE (Community Edition): using its repository or by directly installing its package file. Using the repository is highly recommended.

  • Repository install: Follow the steps listed here to do this.

  • Package install: Go to Pick your Ubuntu version. 16.04 is Xenial for example. Then pick pool/stable/amd64/ and then download the latest DEB files for docker-ce-cli, and docker-ce. Install these packages in the same order.

  • Remember to add your username to the docker group:

$ sudo adduser joe docker
  • You will need to logout and login for the group assignment to take effect. If you find that logout-login to be painful, try this trick.

  • Try Docker and see if it works:

$ docker run hello-world

Tried with: Docker 17.09 and Ubuntu 16.04

One thought on “How to install Docker

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.