Docker is supported by most Linux distributions. The installation of Docker on Linux distributions may be different according to the distributions versions.
Install Docker For Ubuntu, Debian, Mint, Kali
Ubuntu, Debian, Mint, and Kali all of them use very similar packages and repositories with the deb packet management system. The docker can be installed for all of these Linux distributions via the following command. First we remove existing docker installation with the following apt command.
$ sudo apt-get remove docker docker-engine docker.io
Now we update repository and package information with the apt update
command in order to get latest version of the Docker.
$ sudo apt update
With the following apt install
command we install the docker. The docker package name is docker.io
.
$ sudo apt install docker.io
Install Docker For RHEL, CentOS, Fedora
The docker also provided rpm based distirbutions like RHEL, CentOS and Fedora. The docker package is named as docker-engine
and can be installed with the following dnf install
command.
$ sudo dnf install docker-engine
Start Docker Service
The systemctl
command is used to manage services in Linux distirubutions. It is provided and used most of the Linux distributions like Debian, Ubuntu, Kali, Mint, CentOS, RHEL, Fedora etc. The systemctl command can be used to start docker service easily.
$ sudo systemctl start docker