Home » Virtualization » Docker » How to install Docker on Ubuntu 18.04 ?

How to install Docker on Ubuntu 18.04 ?

The steps below shows how to install docker on x86_64 bit Ubuntu desktop and have independent Ubuntu shell inside docker.

[ Note: docker works only with 64 bit Ubuntu, hence if you have 32 bit Ubuntu machine, it will not work ]

If you have any nonworking traces of docker, remove it using below command,

Type below commands on your Ubuntu terminal,

above command will install docker command, you can check using “which docker” command and you would see it installed as /usr/bin/docker

Next we need to install docker engine “docker-ce” as,

Add Docker’s official GPG key

Now, you can verify that docker-ce package is available to install as,

Now, lets check if there is any docker image currently running, which can be checked as,

As, you can see above everything is empty, means no image is currently installed..

Now, install the package as,

above command will install docker engine and start the service which can be verified as,

Verify that Docker is installed correctly by running the hello-world image.

as you see, it pulled the “hello-world” docker image and installed and run this to show the message “Hello from Docker !” which shows you have successfully installed docker on your ubuntu machine.

You can see the “hello-world” docker image installed as,

Subscribe our Rurban Life YouTube Channel.. "Rural Life, Urban LifeStyle"

Leave a Comment