Docker Intallation on Ubuntu
- 2 minsIntroduction
Docker is an application that is using with containers. With the containers you can create one or more environment than you can run your applications in it. They are similar to virtual machines. Docker has so many feature like volume mapping, docker host, docker network, images and more.
With this article I will try to explain Docker installation on Ubuntu 20.04.3 on CLI (Command Line Interface) let’s say terminal level. Why I choose CLI level because If you will work with a server or minimal operation system which has not GUI you must work with commands and CLI. Other advantage is learn that what is going infrastructure.
Before start If you use Windows you should create a VM with Virtual Box or VMware and than installing Ubuntu.
There are installation methods for Docker, In my opinion follow the Install using the repository installation method is the easiest and most understandable method. If you want to learn other methods you can check the Docker Docks for ubuntu.
Install using the repository
Before you install Docker Engine for the first time on a new host machine, you need to set up the Docker repository. Afterward, you can install and update Docker from the repository.
Set up the repository
1-) Update the apt (Advanced Package Tool) and install to required packages.
2-) Add Docker’s official GPG key:
3-) Use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below.
Set up the repository
Install Docker Engine
1-) Update the apt package index, and install the latest version of Docker Engine, containerd, and Docker Compose, or go to the next step to install a specific version:
2-) To install a specific version of Docker Engine, list the available versions in the repo, then select and install:
a. List the versions available in your repo:
As you see list of avaible versions for you repo and next step is installing the spesific versions just select the name of version from second coloumn it should be like that 5:18.09.1~3-0~ubuntu-xenial
3-) Verify that Docker Engine is installed correctly by running the hello-world image.
that is all you installed Docker on your Ubuntu so time to enjoy Docker :)