Installing Docker CE in Ubuntu 18.04 LTS under 2 minutes

Docker allows you to achieve container virtualization, isolating the application scope from the underlying operating system. You can use the following instructions to install Docker Community Edition (CE) in Ubuntu 18.04 under 2 minutes.

Remove any previous installation of docker from your system.

$ sudo apt-get remove docker docker-engine docker.io containerd runc

Update and install prerequisites, and setup the docker repository.

$ sudo apt-get update

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

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

$ sudo apt-key fingerprint 0EBFCD88

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

Install the docker engine.

$ sudo apt-get update

$ sudo apt-get install docker-ce docker-ce-cli containerd.io

Check if the docker engine is running.

$ sudo systemctl status docker

And you are done!

Checkout the following terminal recording if you’d like to see me doing it.

https://asciinema.org/a/291368

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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