How to Install Docker on AlmaLinux

Containerization has completely transformed how we deploy applications. If you are running a virtual private server, adding a container engine is one of the smartest moves you can make for your infrastructure. AlmaLinux serves as a rock-solid, enterprise-grade foundation for this task. Setting up the environment might seem daunting if you are new to Linux server management, but the process is actually quite straightforward. This guide walks you through the exact procedures to get your container runtime up and running smoothly. Whether you are hosting a simple web app or orchestrating complex microservices, having this tool ready on your VPS will significantly streamline your workflow. Let us get your server configured and ready for deployment.

How to Install Docker on AlmaLinux.

Installing Docker on AlmaLinux: Step-by-Step Guide 2026

We will focus specifically on AlmaLinux 9, 10 for this tutorial, as it represents the current stable branch for enterprise deployments. The package management and repository structures have seen some refinements in this version, making the setup process cleaner than ever. Follow the sequence below carefully to ensure a flawless installation.

Step 1: Verify System Requirements and Access

Before touching the terminal, confirm you have a running AlmaLinux 9, 10 instance. You also need a user account with sudo privileges or direct root access. Standard user permissions will not allow you to install system-level packages or manage background services.

Step 2: Update Your System

Keeping your existing software current before adding new components prevents dependency conflicts later in the process. Run the following command to pull the latest patches and package versions.

dnf update -y

The -y flag automatically answers yes to any prompts, saving you a few keystrokes during the update process.

Step 3: Uninstall old versions

dnf remove docker \
        docker-client \
        docker-client-latest \
        docker-common \
        docker-latest \
        docker-latest-logrotate \
        docker-logrotate \
        docker-engine \
        podman \
        runc

Step 4: Add the Official Upstream Repository

AlmaLinux does not include the latest container engine in its default AppStream repositories. We need to add the official upstream source to get the most recent stable release. First, install the utility that manages repository configurations.

dnf install -y dnf-plugins-core

Next, add the actual repository configuration file to your system.

dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Step 5: Execute the Installation via DNF

Now that the package manager knows where to look, you can install the core engine along with essential plugins. We will include the CLI tools, the container runtime, and the compose plugin for multi-container setups.

dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin

docker-compose-plugin

This single command fetches and installs the complete suite required for modern containerized workflows.

Step 6: Launch and Autostart the Daemon

The installation process places the binaries on your disk, but the background service does not start automatically. You need to manually launch it and configure it to boot with your server.

systemctl start docker

systemctl enable docker

The first command wakes up the daemon immediately. The second ensures it survives a system reboot, keeping your applications online without manual intervention.

Step 7: Verify the Installed Release

It is good practice to confirm that the binaries are accessible and the correct version was deployed. This also verifies that your system PATH is configured correctly.

docker --version

You should see an output displaying the current version number, build hash, and architecture.

Step 8: Run a Hello World Container

Running a test image provides the final validation. We will use the official test image designed specifically for this purpose.

docker run hello-world

This command downloads a minimal image, creates a container, prints a welcome message to your terminal, and then exits. Seeing this message confirms your entire stack is functioning perfectly.

How to Uninstall Docker on AlmaLinux

Sometimes infrastructure requirements change, and you might need to remove the container engine from your VPS. The process is just as clean as the installation. First, stop the service to prevent any locked files or active processes.

systemctl stop docker

Next, use the package manager to remove the core packages and all associated dependencies.

dnf remove -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Finally, clean up the residual images, containers, and custom configuration files stored on your local volumes.

rm -rf /var/lib/docker
rm -rf /var/lib/containerd

Your server is now completely stripped of the container environment.

DN

The author

Dmitriy Novitsky

Dmitriy Novitsky, Chief Technology Officer at VPS.one, is a seasoned expert in VPS hosting. With years of experience, he shares valuable insights and technical knowledge to help users optimize their hosting performance and stay ahead in the tech world.

Install Docker

How to Install Docker on Ubuntu VPS

How to Set Up a VPN on Your VPS Server.

How to Set Up a VPN on Your VPS Server

How to Fix the “Warning: Remote Host Identification Has Changed” SSH Error.

How to Fix the “Warning: Remote Host Identification Has Changed” SSH Error