Install Docker on CentOS
This chapter covers how to install and configure Docker Engine on CentOS.
System Requirements
Docker Engine supports the following CentOS versions:
- CentOS 9 Stream
- CentOS 8 Stream
- CentOS 7 (maintenance mode)
Hardware requirements: 64-bit processor, kernel 3.10+, at least 2GB RAM (4GB+ recommended). The centos-extras repository must be enabled.
Uninstall Old Versions
Install Using YUM Repository (Recommended)
1. Install yum-utils
2. Add Docker Repository
3. Install Docker Engine
4. Start Docker
5. Verify Installation
Convenience Script
Post-Installation Setup
Run Docker Without sudo
Enable on Boot
Common Issues
firewalld Conflicts
SELinux Issues
💡 In production, keep SELinux enabled and configure policies for compatibility.
CentOS 7 Kernel Upgrade
CentOS 7 has an older kernel. Consider upgrading for better Docker support: