For a current CentOS installation, use CentOS Stream 9 or CentOS Stream 10, Docker’s RPM repository, and the Docker Engine packages. The supported workflow is to remove conflicting packages, add the CentOS repository, install Engine with its current CLI, containerd, Buildx, and Compose plugins, start the service, and run hello-world as a smoke test.
Antihost offers VPS plans with one-click Docker, NVMe storage and a 14-day free trial.
CentOS Linux 7 and 8 instructions are legacy guidance. Rocky Linux and AlmaLinux can be practical RHEL-family compatibility paths, but Docker says derivative distributions are not tested or verified, so those installations require release-specific validation and a support-policy decision.
As an Amazon Associate I earn from qualifying purchases.
What Docker supports on CentOS now
Docker’s current CentOS installation instructions name CentOS Stream 10 and CentOS Stream 9. They are the maintained CentOS versions to use for a new Docker host according to Docker’s 2026 documentation. The old CentOS Linux 7 and CentOS Linux 8 procedures should not be treated as current instructions simply because their commands may still appear in older tutorials.
CentOS Stream is a continuously delivered distribution between Fedora and the next minor release of Red Hat Enterprise Linux. That update model is a platform choice you should make deliberately: test your workloads against the Stream release you select, keep an update and rollback plan, and record the exact release used for production. Docker’s documentation establishes the Engine installation path; it does not establish a lifecycle or commercial-support policy for your operating system.
#1 Best Overall
Supported CPU architectures listed by Docker
| Platform | Docker-documented releases | Architectures listed by Docker | Repository path |
|---|---|---|---|
| CentOS Stream | Stream 9 and Stream 10 | x86_64/amd64, arm64/aarch64, and ppc64le | https://download.docker.com/linux/centos/docker-ce.repo |
| RHEL | RHEL 8, RHEL 9, and RHEL 10 | x86_64/amd64, arm64/aarch64, and s390x | https://download.docker.com/linux/rhel/docker-ce.repo |
| Rocky Linux | Derivative; not tested or verified by Docker | Not stated by Docker’s general matrix for the derivative itself | Validate the repository and release combination before deployment |
| AlmaLinux | Derivative; not tested or verified by Docker | Not stated by Docker’s general matrix for the derivative itself | Validate the repository and release combination before deployment |
The architecture names in the table are Docker’s platform labels, not a guarantee that every image you need is published for every architecture. Confirm that your application images and any native dependencies support the CPU type of the host.
Prepare a CentOS Stream host
Use a machine running CentOS Stream 9 or 10 with administrative access and a working DNF configuration. The repository method is Docker’s recommended installation method because it makes routine installation and upgrades easier than managing individual RPM files.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Check the release before changing packages
Confirm the host is actually Stream 9 or Stream 10 before following the CentOS procedure. A simple check is:
cat /etc/centos-release
If the output identifies CentOS Linux 7 or 8, stop and plan a platform migration rather than applying this procedure unchanged. If it identifies another RHEL-family distribution, use the compatibility guidance later in this article and the distribution vendor’s support policy.
Understand what package removal does
The first command removes packages that can conflict with Docker Engine packages. Docker states that removing these packages does not automatically delete images, containers, volumes, or networks stored under /var/lib/docker/.
sudo dnf remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
Review DNF’s transaction summary. Do not approve a transaction that would remove unrelated production software. If this host already runs containers, record how they are started and where their data is stored before changing the runtime.
Install Docker Engine on CentOS Stream
1. Install the repository-management plugin
Install dnf-plugins-core, which supplies the repository-management command used in Docker’s procedure:
sudo dnf -y install dnf-plugins-core
2. Add Docker’s official CentOS repository
Add the repository file with the exact URL below:
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
The same repository URL is visible here for inspection: Docker’s CentOS Docker CE repository file. CentOS Extras must be enabled for this procedure; Docker’s current instructions say it is enabled by default on the supported Stream releases.
3. Install Engine and the current plugins
Install the complete package set Docker names for the current workflow:
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
The packages have distinct roles:
docker-cesupplies the Docker Engine daemon.docker-ce-clisupplies the command-line client.containerd.iosupplies the container runtime component packaged for Docker Engine.docker-buildx-pluginsupplies the modern image-building command.docker-compose-pluginsupplies Compose as a Docker CLI plugin.
DNF may ask you to accept a GPG key. Docker instructs you to verify this fingerprint before accepting it: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35. If the displayed fingerprint differs, cancel the transaction and investigate the repository configuration rather than accepting an unverified key.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesPackage installation creates the docker group, but it does not add any users to that group. It also does not start the daemon automatically.
4. Start Docker and enable it at boot
For the usual server configuration, enable the service and start it immediately:
sudo systemctl enable --now docker
To start Docker only for the current boot and leave automatic startup disabled, use:
sudo systemctl start docker
Docker’s documented behavior is important here: installing the packages alone does not start Docker. Check the service state after starting it:
sudo systemctl status docker
Use the status output to distinguish a service that is inactive from a command-line permission problem. Those are different failures and require different fixes.
5. Run the documented smoke test
Verify the installation with Docker’s test command:
sudo docker run hello-world
The command downloads a test image if it is not already present, creates and runs a container, prints a confirmation message, and exits. A successful result demonstrates that the CLI can contact the daemon and that the daemon can retrieve and run the test image. It is a smoke test, not an application deployment test.
Using Docker without typing sudo
A newly installed docker group has no members. Consequently, an ordinary user who runs docker ps or docker run can receive a permission error even when the service is healthy.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchYou have two separate choices:
- Continue using
sudo docker ..., which keeps each daemon request explicitly privileged. - Follow Docker’s post-install guidance to configure a user for non-root operation, after reviewing the security implications of granting access to the Docker daemon.
Docker also documents rootless mode for users who need a daemon without root privileges. Rootless operation is a distinct configuration, not something that happens merely because a user is added to the docker group. Select one approach, document it, and test it with the same workload commands your operators will use.
Install Docker on RHEL 8, 9, or 10
Docker’s RHEL instructions support RHEL 8, RHEL 9, and RHEL 10. The flow is nearly identical to CentOS Stream, but the repository URL and conflict list differ. RHEL hosts commonly include Podman tooling, so Docker’s documented removal command includes both podman and runc.
1. Remove conflicting packages
sudo dnf remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc
As with the CentOS command, inspect the proposed transaction. Removing a package does not by itself erase Docker images, containers, volumes, or custom configuration.
2. Add the RHEL repository
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
Use the repository file at Docker’s RHEL Docker CE repository. Do not substitute the CentOS repository URL on a RHEL host.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →3. Install, start, and verify
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl enable --now docker
sudo docker run hello-world
Review the GPG fingerprint if DNF prompts for a key, and remember that package installation does not start the service until the systemctl command is run.
Rocky Linux and AlmaLinux: compatibility, not a Docker verification
Rocky Linux and AlmaLinux are RHEL-family distributions commonly selected for workloads that previously ran on CentOS Linux. Docker’s general installation matrix explicitly warns that derivative distributions are not tested or verified. That warning applies even when the packages appear to install successfully.
For either derivative, make the decision in this order:
- Identify the exact distribution major and minor release, CPU architecture, and enabled repositories.
- Read the derivative vendor’s Docker and container-runtime guidance for that release.
- Decide whether your organization accepts an installation that Docker has not tested or verified.
- Test the repository, package transaction, service startup, image pulls, storage behavior, and rollback process on a non-production host.
- Record whether support comes from your operating-system vendor, Docker, an internal platform team, or no formal vendor channel.
Do not describe Rocky Linux or AlmaLinux as officially verified Docker platforms solely because they are RHEL-compatible. If you use a RHEL-family repository, validate that choice against the derivative’s release policy and package substitutions. The official Docker material establishes the CentOS and RHEL repository paths; it does not provide a verification statement for these derivatives.
Recommended Free Tools
Choosing between CentOS Stream, RHEL, Rocky Linux, and AlmaLinux
The right successor depends on more than whether the installation command completes. Compare the support status Docker documents with the operating-system lifecycle, update policy, vendor support requirements, and architecture you actually need.
| Decision factor | CentOS Stream | RHEL | Rocky Linux | AlmaLinux |
|---|---|---|---|---|
| Docker installation status | Docker documents Stream 9 and Stream 10 | Docker documents RHEL 8, 9, and 10 | Derivative; Docker says not tested or verified | Derivative; Docker says not tested or verified |
| Repository named by Docker | CentOS repository | RHEL repository | Not separately established; validate the release | Not separately established; validate the release |
| Architectures in Docker’s matrix | x86_64/amd64, arm64/aarch64, ppc64le | x86_64/amd64, arm64/aarch64, s390x | Not stated for the derivative | Not stated for the derivative |
| Lifecycle and update policy | Not stated in Docker’s installation material; verify with the OS project | Not stated in Docker’s installation material; verify with the OS vendor | Not stated in Docker’s installation material; verify with the OS project | Not stated in Docker’s installation material; verify with the OS project |
| Commercial vendor support requirement | Not stated | Not stated | Not stated | Not stated |
If Docker’s documented platform status is your primary requirement, CentOS Stream 9/10 or RHEL 8/9/10 provide the clearest documented paths. If you choose a derivative for organizational, budget, or operational reasons, treat compatibility testing and support ownership as explicit project work rather than an assumption.
Upgrading an existing installation
Repository installations
For an installation made from Docker’s repository, repeat the repository-based installation procedure when you want to move to a newer Engine release, selecting the desired package version according to your change-control process. Test the upgrade in a staging host first, especially when the host runs stateful containers or production Compose projects.
Keep a record of the current Engine, CLI, containerd, Buildx, and Compose package versions before changing them. Verify the daemon after the transaction with systemctl status docker and run a representative container workload, not only a version command.
Rank #4
Manually downloaded RPMs
If you installed individual RPM files rather than configuring a repository, download the newer matching files and use DNF’s upgrade operation. Keep the five component types aligned: containerd.io, docker-ce, docker-ce-cli, docker-buildx-plugin, and docker-compose-plugin.
Do not mix an arbitrary CLI version with an unrelated Engine or containerd build. Preserve the RPM files used for a release so you can reproduce or roll back the transaction according to your organization’s package-management procedure.
Air-gapped RHEL installation with RPM files
Docker provides a manual RPM path for RHEL systems that cannot reach the repository directly. On a connected staging system, obtain matching RPMs from the RHEL Docker repository for the target architecture:
containerd.iodocker-cedocker-ce-clidocker-buildx-plugindocker-compose-plugin
Transfer those files and any approved dependency packages through your organization’s air-gap process. Place only the intended RPM set in a working directory, then install the files with DNF:
Free tools Windows power users keep installed
One-click scans. No signup required.
sudo dnf install ./*.rpm
Using a directory containing only the five intended Docker RPMs prevents the wildcard from accidentally installing unrelated packages. After installation, enable and verify the service:
sudo systemctl enable --now docker
sudo docker run hello-world
For an air-gapped host, the smoke test can succeed only if the test image is already available locally or your internal image mirror is configured. Plan image transfer and registry access separately from the Engine package installation.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Why Docker’s convenience script is usually the wrong production choice
Docker publishes a convenience script at https://get.docker.com. Docker says the script is useful for development or for building a tailored provisioning experiment, but it is not recommended for production environments.
The warnings are operationally significant:
- It installs dependencies without asking for confirmation.
- It can introduce unexpected major-version upgrades.
- It is not designed to upgrade an existing Docker installation.
- Its behavior is less explicit than a reviewed repository or RPM transaction.
If you evaluate the script, preview it with:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh --dry-run
Use the preview to inspect what would happen, then decide whether your provisioning controls permit it. For production CentOS Stream and RHEL hosts, the repository procedure gives you clearer package and upgrade control.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Uninstall Docker without deleting data by accident
To remove Docker packages from either CentOS Stream or RHEL, use:
sudo dnf remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
Docker states that this package removal does not automatically delete images, containers, volumes, or custom configuration. That behavior is useful when replacing the Engine, but it can surprise administrators who expect a clean wipe.
Best Value
Keep the local data
Stop after removing the packages if you intend to preserve local images, containers, volumes, or configuration for a later reinstall. Protect and inventory the data before changing the host again.
Delete all local Docker data
Deleting /var/lib/docker and /var/lib/containerd is destructive. It removes local Docker state and can destroy volumes that are not stored elsewhere. Perform this only after confirming backups, migration, and retention requirements:
sudo rm -rf /var/lib/docker /var/lib/containerd
Do not run that command as a routine uninstall step. Package removal and data destruction are separate decisions and should be approved separately.
Troubleshooting the common failure points
DNF cannot find a Docker package
- Confirm the host is CentOS Stream 9 or 10, or RHEL 8, 9, or 10, rather than an old CentOS Linux release.
- Check that you added the repository matching the operating system: the URL containing
/centos/for CentOS Stream or/rhel/for RHEL. - Verify that the host architecture is one Docker lists for that platform.
- Inspect the repository file and DNF output before retrying; do not substitute a repository from an unrelated distribution.
DNF proposes to remove unexpected software
Cancel the transaction and inspect package dependencies. On RHEL, the documented conflict list includes podman and runc; on CentOS Stream, the documented removal command lists the older Docker package names. Removing additional production packages without reviewing the impact can disrupt existing container workloads.
The Docker command reports a permission error
First test with sudo docker run hello-world. If that succeeds, the daemon and image path work, and the remaining issue is user access. Decide whether to continue with sudo, configure the user-facing Docker access described in Docker’s post-install guidance, or use rootless mode.
The service is not running
Package installation does not start Docker. Run:
sudo systemctl enable --now docker
Then inspect:
sudo systemctl status docker
If you intentionally do not want boot startup, use sudo systemctl start docker for the current session and make service startup part of your host’s operational procedure.
Recommended Free Tools
The GPG fingerprint does not match
Do not accept the key automatically. Cancel the installation, confirm the repository URL and package source, and compare the displayed fingerprint with Docker’s documented value 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35.
Uninstalling did not free disk space
That is expected when images, containers, volumes, and custom configuration remain. Decide whether the data must be retained. Only an explicitly approved removal of /var/lib/docker and /var/lib/containerd deletes that local state.
A practical decision checklist
- Choose CentOS Stream 9 or 10, RHEL 8/9/10, or a derivative with a documented reason.
- Confirm the CPU architecture and image availability for your workloads.
- Use the repository matching the operating system whenever routine upgrades matter.
- Remove only the conflicting packages appropriate to that platform.
- Verify the GPG fingerprint if prompted.
- Install Engine, CLI, containerd, Buildx, and Compose together.
- Start Docker explicitly with
systemctl. - Run
sudo docker run hello-worldbefore deploying an application. - Choose a deliberate access model: sudo, Docker-group access, or rootless mode.
- Test upgrades and uninstall procedures while local data is backed up or intentionally disposable.
- For Rocky Linux or AlmaLinux, document the fact that Docker does not test or verify derivatives and assign an owner for compatibility validation.
The bottom line
For a new CentOS-family Docker host, CentOS Stream 9 or 10 with Docker’s CentOS repository is the current CentOS procedure. RHEL 8, 9, and 10 have their own documented repository path and a conflict list that includes Podman and runc. Rocky Linux and AlmaLinux may work as RHEL-family compatibility options, but they are not Docker-verified platforms in the cited matrix. Keep the installation explicit, start the service deliberately, verify with hello-world, and treat upgrades, user access, and data deletion as separate operational decisions.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

