pod-compose is a tool designed to simplify running multi-container applications using Podman Pods, inspired by docker-compose.
-
Navigate to your project directory: Ensure your
docker-compose.yml(or.yaml) is present.cd /path/to/your/project -
Build Images (Optional): If your services require building from a Dockerfile:
pod-compose build
-
Start Services: This will create a Podman Pod (named after your directory) and start all services inside it.
pod-compose up
-
Check Status: See running containers within the pod.
pod-compose ps
-
View Logs: See logs for all services or specific ones.
# All logs pod-compose logs # Follow logs pod-compose logs -f # Specific service pod-compose logs web
-
Interact with Containers: Run a command inside a container.
# Syntax: pod-compose exec [service_name] [command] pod-compose exec web /bin/bash
-
Stop and Remove: When you are done, bring everything down.
pod-compose down
You can stop, start, or restart the entire pod without removing it.
pod-compose stop
pod-compose start
pod-compose restartTo pull the latest images defined in your compose file:
pod-compose pullTo use a specific compose file instead of the default docker-compose.yml:
pod-compose -f my-compose.yml upTo check which version of pod-compose you are running:
pod-compose version- Pod already exists: If
upfails saying the pod exists, trydownfirst orstartif you just want to resume. - Image not found: Ensure you run
buildorpullif the images are not available locally.