How to install and configure Docker in Ubuntu?

Mobio Solutions
2 min readSep 23, 2019

--

Install Docker from Ubuntu Repository

  • $ sudo apt install docker.io

Below command will start Docker and ensure that starts after the reboot:

  • $ sudo systemctl start docker
  • $ sudo systemctl enable docker
  • $ docker -version

Output:

Docker version 17.03.2-ce, build f5ec1e2

Docker Login

  • $ sudo docker exec -it docker /bin/bash

Install the Dependencies

  • $ sudo apt update
  • $ sudo apt install apt-transport-https ca-certificates curl software-properties-common

Add Docker Repository

Create a new file for the Docker repository at /etc/apt/sources.list.d/docker.list. In that file, place one of the following lines choosing either stable, nightly or edge builds:

Next, you need to add Docker’s GPG key.

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

--

--

Mobio Solutions
Mobio Solutions

Written by Mobio Solutions

Mobio Solutions is a leading and trusted Custom Software Development Company with a state-of-the-art development centre in Ahmedabad, India.

No responses yet