Docker Linux Ubuntu

  



The Docker installation package available in the official Ubuntu repository may not be the latest version. To ensure we get the latest version, we’ll install Docker from the official Docker repository. To do that, we’ll add a new package source, add the GPG key from Docker to ensure the downloads are valid, and then install the package. Docker is a containerization technology that allows you to quickly build, test and deploy applications as portable, self-sufficient containers that can run virtually anywhere. In this tutorial, we'll cover how to install Docker on Ubuntu 18.04 and explore the basic Docker concepts and commands.

This tutorial explains, how to install docker on Ubuntu.

Docker

Docker is a platform that combines applications and its dependencies in the form of packages called a container. We can run multiple containers on a single Operating System. Containers are not Virtual Machines. Virtual Machines requires Operating System to run applications, but containers do not. As containers don’t need an Operating System, it takes very little time to start and hence it is very faster than Virtual Machines.

Read About: How to Install Docker on Windows

&& How to install Ansible on Ubuntu

Install Docker on Ubuntu

Step 1- Update your Ubuntu Linux Box.

Docker Compose Linux Ubuntu

$ sudo apt-get update -y

Step 2 – Download and run a get-docker.sh script to install docker.

Linux

$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh

or you can Download and run Test Script.

Download and run testing version, download and install test-docker.sh script using the following commands.

$ curl -fsSL https://get.docker.com -o test-docker.sh
$ sudo sh test-docker.sh

Step 3- Add a user to the Docker group.

If you would like to use Docker with a non-root user, using the following command.

Add a new user docker-user and set a password

$ sudo useradd docker-user

$ sudo passwd docker-user

Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Add docker-user to Docker group

$ sudo usermod -aG docker docker-user

Step 4 – Check Docker Version

Check Docker Version using the following command

$ docker – -version
Docker version 19.03.8, build afacb8b7f0

Docker Gui Linux Ubuntu

Uninstall Docker on Ubuntu

Use the following command to uninstall docker completely, including Docker Engine, CLI and Containerd Package

$ sudo apt-get purge docker-ce docker-ce-cli containerd.io -y

Also delete all Docker Images, Containers, and Volumes that not automatically remove.

$ sudo rm -rf /var/lib/docker

Note: If you install docker using the script, you should update the docker using the package manager only. Don’t re-run docker script, as it can cause issues if it attempts to re-add repositories.

I hope you enjoyed this tutorial and learned about “How to install Docker on Ubuntu using Script”. If you think this is really helpful, please do share this article with others as well. Please also share your valuable feedback, comment, or any query in the comment box. I will really happy to resolve your all queries any.

Docker Linux Ubuntu

Thank You

If you think we helped you or just want to support us, please consider these:-

Install Docker Linux Ubuntu 20.04

Connect to us: Facebook | Twitter