Installing Docker Engine and Docker Compose version 2 on Rocky Linux 9
In a world where containerised applications are becoming increasingly popular, Shape.Host provides a reliable platform for hosting Rocky Linux 9 VPS with Docker Engine and Docker Compose v2. Here's a step-by-step guide on how to set up this powerful container stack.
**Step 1: Create a Rocky Linux 9 Server Instance on Shape.Host**
1. Log in to Shape.Host and select your preferred data center location. 2. Choose Rocky Linux 9 (64-bit) as the operating system. 3. Click "Create Instance" and wait for provisioning. Once ready, note the IP address for SSH access.
**Step 2: Connect to Your Rocky Linux 9 Instance**
Use SSH with the server IP address. For example, `ssh root@
**Step 3: Update System Packages and Install Dependencies**
Run the following commands:
```bash sudo dnf update -y sudo dnf install -y yum-utils device-mapper-persistent-data lvm2 ```
These packages are necessary for Docker’s storage and management.
**Step 4: Add Docker’s Official Repository**
Execute:
```bash sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo ```
This adds Docker’s repository compatible with Rocky Linux 9.
**Step 5: Install Docker Engine and Docker Compose Plugin**
Install Docker Engine, CLI, and Docker Compose v2 plugin with:
```bash sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ```
**Step 6: Start and Enable the Docker Service**
Enable Docker to start on boot and start it immediately:
```bash sudo systemctl enable docker sudo systemctl start docker ```
**Step 7: Verify Installation**
Check Docker version:
```bash docker --version ```
Check Docker Compose version (v2):
```bash docker compose version ```
Note: Docker Compose v2 uses the new command `docker compose` (space instead of hyphen).
With this setup, you can efficiently run Docker containers with the latest Docker Compose capabilities on Rocky Linux 9 hosted on Shape.Host infrastructure. To deploy containerised applications, create your `docker-compose.yml` file and manage containers easily with `docker compose up` commands.
This procedure is based on the official installation guide tailored for Rocky Linux 9 on Shape.Host and ensures you have a fully working Docker environment in the cloud. Rocky Linux 9 offers a binary-compatible clone of Red Hat Enterprise Linux 9, designed as a drop-in replacement for CentOS. It benefits from enterprise-grade kernel stability and full integration with security subsystems.
For organisations seeking a CentOS replacement with full Docker support and upstream compatibility, Rocky Linux 9 is a reliable and scalable platform. It is ideal for teams that need RHEL compatibility and security hardening, especially in regulated industries or hybrid cloud environments. Docker Compose v2 on Rocky Linux 9 offers enhanced performance and error handling over Compose v1, and supports container networks, volumes, environment files, and health checks.
Shape.Host offers fast, secure, and scalable cloud infrastructure for running containerised applications. For performance-optimised cloud hosting, deploy containers on Shape.Host Linux SSD VPS.
In this guide, we're using technology like data-and-cloud-computing to efficiently run Docker containers with the latest Docker Compose capabilities on Rocky Linux 9, a CentOS replacement hosted on Shape.Host. With Docker Compose v2 on Rocky Linux 9, organisations can leverage enhanced performance and error handling, as well as container networks, volumes, and health checks on a reliable and scalable platform.