In this tutorial we will show you how to install Docker on CentOS 8. For those of you who didn’t know, Docker is an open-source tool that makes creating and managing Linux containers (LXC) easy. With Docker, the applications resides inside the container on top of the Linux operating system. Docker uses Kernel features such as cgroups and namespace to allow independent container to run on single os instance.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Docker on a CentOS 8 server.
Install Docker on CentOS 8
Step 1. First let’s start by ensuring your system is up-to-date.
Step 2. Installing Docker on CentOS.
There are two editions of Docker available.
- Community Edition (CE): ideal for individual developers and small teams looking to get started with Docker and experimenting with container-based apps.
- Enterprise Edition (EE): Designed for enterprise development and IT teams who build, ship, and run business-critical applications in production at scale.
The Docker Enterprise Edition requires an active license to use. In this guide, we will install Docker CE on CentOS 8. Let’s add Docker repository before we can install it:
Verify the repository has been enabled:
The docker-ce-stable repository is now enabled on our system. The repository contains several versions of the docker-ce package, to display all of them, we can run:
You can install the latest version of the docker ce using below command:
To install a specific version, all we have to do is to provide the fully qualified package name, for example:
Next step is to start and enable docker using systemctl:
Congratulation’s! You have successfully installed Docker. Thanks for using this tutorial for installing Docker on CentOS 8 system. For additional help or useful information, we recommend you to check the official Docker website.