Docker Engine on Rocky Linux 9 – Reliable Containerization on an Enterprise-Grade Linux Platform

Docker Engine is the industry-standard container runtime for building, running, and managing containerized applications. When paired with Rocky Linux 9, a RHEL-compatible, community-maintained enterprise Linux distribution, it forms a stable, secure, and efficient foundation for both development and production container workloads.


Why Use Rocky Linux 9 for Docker?

Rocky Linux 9 is a direct, binary-compatible downstream of Red Hat Enterprise Linux 9. It provides the same level of system stability and enterprise features as RHEL, making it highly suitable for running Docker Engine in environments where long-term support and consistent behavior are critical.

Key benefits of using Docker on Rocky Linux 9:

  • Full compatibility with RHEL packages and security policies
  • Long-term support lifecycle, ideal for production deployments
  • Integrated SELinux enforcement for container isolation
  • Systemd-based service management for robust daemon control
  • OverlayFS and cgroups v2 support out of the box

Docker Engine Components

Docker Engine consists of:

  • dockerd – the background service managing containers
  • docker CLI – the command-line interface to interact with containers, images, and volumes
  • containerd – the OCI-compliant runtime delegated to by Docker
  • runc – the low-level container runtime

Docker provides a full container lifecycle management system and integrates with orchestration tools, registries, CI/CD pipelines, and monitoring platforms.


System Integration with Rocky Linux 9

System ComponentDocker Compatibility
Linux Kernel 5.14Supports OverlayFS, cgroup v2, namespaces, and seccomp
Systemd 250+Native service control for Docker (systemctl start docker)
SELinuxEnforcing mode enabled by default; Docker provides SELinux profiles
FirewallDManages NAT and forwarding for container networking
dnf & EPELProvides packages for Docker, container tools, and dependencies

Rocky Linux offers a consistent, RHEL-aligned foundation for container workloads, with hardened security defaults and robust logging capabilities.


Use Cases for Docker on Rocky Linux 9

  • Hosting modern microservices using containers and Compose
  • Packaging monolithic applications into isolated environments
  • Building development and test environments with reproducible containers
  • Creating CI/CD pipelines with tools like Jenkins, GitLab CI, or Drone
  • Running self-hosted applications such as databases, message queues, and monitoring tools
  • Deploying containerized apps across hybrid and multi-cloud infrastructure

Rocky Linux’s predictable system behavior is particularly useful in regulated and enterprise-grade environments.


Performance and Resource Control

FeatureBenefit in Docker Environments
Cgroups v2Enables precise allocation of CPU, memory, and I/O per container
NamespacesProvides isolation for process IDs, users, networks, and mounts
OverlayFS v2Reduces image size and improves filesystem performance
SeccompFilters potentially unsafe syscalls used inside containers
Rootless DockerOptional configuration for non-privileged container execution

These features are fully supported in Rocky Linux 9, allowing Docker to perform efficiently and securely across a variety of deployment models.


Docker vs Podman on Rocky Linux 9

AspectDocker EnginePodman
Daemon modelRequires background daemon (dockerd)Daemonless; CLI spawns containers directly
CLI compatibilityFull Docker CLIMostly Docker-compatible CLI
Compose supportNative (docker compose)Supported via Podman Compose
Rootless containersSupported with setupNative and enabled by default
Kubernetes integrationVia containerdCompatible through CRI-O

While Docker remains the most widely adopted container runtime for developers and CI/CD tools, Podman is often chosen for server environments with stricter security or no-daemon policies.


Security Considerations

Rocky Linux 9 provides several features that enhance Docker’s security:

  • SELinux in enforcing mode helps restrict container behavior at the kernel level
  • FirewallD and nftables help isolate container networks
  • Auditd tracks container system activity
  • Systemd integrates with journald for centralized logging
  • Rootless Docker support allows users to run containers without elevated privileges

Administrators can further harden the system by customizing SELinux policies or isolating Docker with AppArmor or external firewalls.


Rocky Linux 9 as a Base Image for Containers

Rocky Linux also provides official container images such as rockylinux:9, which are useful for:

  • Building enterprise-grade RPM-based application containers
  • Maintaining consistency across development and production environments
  • Using trusted and signed container layers for security-sensitive applications

These images are minimal and well-maintained, making them suitable for both general-purpose and specialized container builds.


Docker Engine on Rocky Linux 9 delivers a high-performance, enterprise-ready container environment built on a stable, RHEL-compatible operating system. With a strong focus on compatibility, security, and long-term viability, this combination is ideal for organizations that require reliability and support across their container infrastructure.

Rocky Linux 9 offers the same robustness as RHEL without vendor lock-in, making it a compelling choice for deploying Docker containers in production environments, development stacks, and hybrid cloud platforms.


Step 1: Set Up a Server Instance on Shape.Host

To begin, you’ll need a clean Rocky Linux 9 VPS. Shape.Host offers fast, scalable cloud VPS solutions that are perfect for Docker-based projects.

Follow these steps to create your server:

Go to https://shape.host and sign in.

Click on “Create” in the top menu.

Choose “Instance” from the options available.

Shape.host Resources dashboard with Create > Instance highlighted.

Select your preferred data center (e.g., Frankfurt, Dallas).

Shape.host instance form with the data center location selector highlighted.

For the operating system, select Rocky Linux 9 (64-bit).

Pick a hosting plan with at least 2 CPUs, 2 GB RAM, and 20 GB SSD.

Shape.host instance form with the operating system image selector highlighted.

Click “Create Instance” to launch your server.

Shape.host instance form with the Create Instance button highlighted.

Once it’s ready, find your instance’s IP address in the Resources section.

Shape.host Resources dashboard with the server IP address highlighted.

How to Connect to Your Instance

Use SSH to connect once the server is ready.

On Linux/macOS:

Open your terminal and run:

ssh root@your_server_ip

Replace your_server_ip with your actual server IP.

On Windows:

Use PuTTY:

  1. Download PuTTY from https://www.putty.org.
  2. Open PuTTY and paste your instance IP into the Host Name field.
  3. Use port 22 and select SSH.
  4. Click Open and log in with the username root.

Step 2: Install Docker Engine on Rocky Linux 9

Below are the exact commands to install Docker Engine, split for clarity and with all intended comments included.

1. Update your system packages:

dnf update
Terminal showing DNF/YUM package management commands and output.

2. Install necessary tools and dependencies:

dnf install yum-utils curl ca-certificates gnupg lsb-release
Terminal showing DNF/YUM package management commands and output.

3. Create the yum repository directory:

mkdir -p /etc/yum.repos.d

4. Add the Docker repository:

tee /etc/yum.repos.d/docker-ce.repo > /dev/null <<EOF
[docker-ce-stable]
name=Docker CE Stable - \$basearch
baseurl=https://download.docker.com/linux/centos/9/\$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg
EOF
Terminal showing file and directory setup commands.

5. Install Docker Engine and its components:

dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Terminal showing DNF/YUM package management commands and output.

6. Start the Docker service:

systemctl start docker

7. Enable Docker to start automatically on boot:

systemctl enable docker

8. Check the status of the Docker service:

systemctl status docker
Terminal showing systemd service management commands or output.

Step 3: Verify Docker Installation

To ensure Docker is working correctly, run the hello-world container:

docker run hello-world

You should see a success message confirming that Docker Engine is installed and running properly.

Terminal showing container image download progress.

Optional Step: Uninstall Docker (if needed)

If you ever need to remove Docker, use the following commands:

1. Remove Docker and its related components:

dnf remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Terminal showing DNF/YUM package management commands and output.

2. Delete Docker-related data:

rm -rf /var/lib/docker
rm -rf /var/lib/containerd
Terminal showing docker commands or output during Delete Docker-related data:.

You have successfully installed Docker Engine on Rocky Linux 9. This setup allows you to create and manage containers for development and production environments effortlessly. For fast, scalable, and reliable cloud hosting, choose Shape.Host Cloud VPS—perfect for running Docker and other modern DevOps tools.

Visit https://shape.host to launch your own cloud server today.