How to Install Docker Compose on AlmaLinux 10
Docker Compose is a tool used to define and run multi-container Docker applications. Instead of running multiple `docker run` commands manually, you can define services, networks, and volumes in a single YAML file and start everything with one command.
This guide explains how to install Docker Compose on AlmaLinux 10, verify the installation, and run a simple example project.
Prerequisites
Before installing Docker Compose, make sure:
- Docker is already installed
- You have sudo privileges
- The system is updated
Check Docker installation:
Check Docker service status:
If Docker is not installed, install it first:
- How to Install Docker on AlmaLinux 10
Method 1: Install Docker Compose Plugin (Recommended)
Modern Docker versions include Docker Compose as a plugin.
Install it using DNF:
Verify installation:
> Note: The correct command is `docker compose` (with a space), not `docker-compose`.
Method 2: Install Standalone Docker Compose (Legacy)
If you need the old standalone version:
Download the binary:
Apply executable permission:
Verify installation:
Step 3. Create a Simple Docker Compose Project
Create a project directory:
Create a `docker-compose.yml` file:
Step 4. Start the Service
Run the container:
Check running containers:
Now open your browser:
You should see the Nginx welcome page.
Step 5. Stop the Service
To stop containers:
Common Issues
docker: command not found
Docker is not installed or not running.
Check service:
docker compose command not found
You may be using an older Docker version.
Install the Compose plugin:
Permission denied
Run Docker without sudo by adding user to docker group:
Docker Compose vs Docker Run
Related Articles
- How to Install Docker on AlmaLinux 10
- How to Install Node.js on AlmaLinux 10
- How to Install Nginx on AlmaLinux 10
- How to Install Redis on AlmaLinux 10
- How to Install PostgreSQL on AlmaLinux 10
Conclusion
Docker Compose simplifies managing multi-container applications on AlmaLinux 10. It is essential for modern development workflows, especially when working with microservices, Node.js applications, databases, and reverse proxies.
Once installed, you can quickly deploy full-stack environments using simple YAML configuration files.