How to install Docker CE on Linux system
You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose
How to install Docker CE on Ubuntu / Debian / Fedora / Arch Linux and CentOS Linux systems? At the time of this writing, Docker has two major versions-Docker CE (Community Edition) and Docker EE (Enterprise Edition). This article will focus on the installation of Docker CE on various Linux operating system distributions.
Docker is a container runtime engine that allows you to package applications with all dependencies into standardized units for software development.
Roustabout Container Package the complete software File system Contains everything it needs to run: code, run, System Tools, System library -Everything you can install on the server. This ensures that no matter what environment it is running in, it will always run the same content.
Here, we will introduce the installation of Docker CE on Ubuntu, Debian, Fedora, CentOS and Arch Linux distributions.
Install Docker CE on Ubuntu Linux
Uninstall the old version of Docker. The old version of Docker is named docker or docker-engine. If it is installed, please uninstall it first.
sudo apt update
sudo apt remove docker docker-engine docker.io 2>/dev/null
The Docker CE package is now called docker-ce.Update apt
Packing index:
sudo apt update
Install the package to allow the use of the repository via HTTPS:
sudo apt -y install apt-transport-https ca-certificates curl software-properties-common
Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Add a stable repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
Install docker ce:
sudo apt update
sudo apt -y install docker-ce docker-ce-cli containerd.io
If you want to use Docker as a non-root user, you should now consider adding your user to the “docker” group in a way similar to the following:
sudo usermod -aG docker $USER
Run the following command to view the installed Docker version.
$ Client: Docker Engine - Community
Version: 20.10.2
API version: 1.41
Go version: go1.13.15
Git commit: 2291f61
Built: Mon Dec 28 16:17:43 2020
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.2
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 8891c58
Built: Mon Dec 28 16:15:19 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.3
GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc:
Version: 1.0.0-rc92
GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version: 0.19.0
GitCommit: de40ad0
To get more detailed information about docker, run:
$ docker info
Install Docker CE on Debian Linux system
Update the apt package index:
sudo apt-get update
Install the package to allow the use of the repository via HTTPS:
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
Set up a stable repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
Install Docker:
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io
Install Docker CE on Fedora Linux
Uninstall the old version of Docker:
sudo dnf remove docker docker-common docker-selinux docker-engine-selinux docker-engine 2>/dev/null
Configure the Docker warehouse:
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
Install Docker CE:
sudo dnf install docker-ce docker-ce-cli containerd.io
Start and enable the docker service:
sudo systemctl start docker && sudo systemctl enable docker
Install Docker CE on CentOS Linux
Uninstall the old version:
sudo yum remove docker docker-common docker-selinux docker-engine
Installation prerequisites:
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
Set up a stable warehouse:
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Install Docker CE:
sudo yum -y install docker-ce docker-ce-cli containerd.io
If you encounter dependency errors, run:
sudo yum install -y --setopt=obsoletes=0 docker-ce docker-ce-selinux
Start and enable the docker service:
sudo systemctl start docker && sudo systemctl enable docker
Install Docker CE Wanjialang on Arch
Install it:
yay – The best AUR assistant for Arch Linux/Manjaro
Use pacaur to install Docker CE:
$ yay -S --noconfirm --needed docker
After installing Docker, you may be interested:
Install Docker UI Manager – Portainer
Ctop-the highest command of the container indicator
Install and configure Docker registry on CentOS 7
Install Docker and Docker Compose on RHEL 8 / CentOS 8
label
- How to install Docker CE on Ubuntu
- How to install Docker CE on Debian
- Install Docker CE on Arch Linux
- Install Docker CE on Fedora Linux
- Install Docker CE on CentOS Linux
You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose