Docker Compose Support

Docker Compose Support #

Quad-Ops converts Docker Compose files to Podman Quadlet units for systemd management. For comprehensive documentation on Docker Compose syntax and features, see the Compose Specification.

Supported Compose Versions #

  • No version specified (treated as 3.x) [Recommended]
  • Version 3.0 through 3.8 (latest)
  • Version 2.x (partial compatibility)

Standard Docker Compose Features #

Quad-Ops supports the full Docker Compose specification. For detailed documentation on standard features, refer to:

Podman-Specific Extensions #

Environment Secrets #

Map Podman secrets to environment variables:

services:
  app:
    environment:
      - DB_PASSWORD_FILE=/run/secrets/db_password
    x-podman-env-secrets:
      DB_PASSWORD: db_password  # secret name -> env var
      API_KEY: api_secret

Volume Extensions #

Podman-specific volume options:

services:
  app:
    volumes:
      - "data:/data"
    x-podman-volumes:
      - "cache:/tmp/cache:O"  # Overlay mount
      - "logs:/logs:U"        # Chown to container user

Build Extensions #

Additional build arguments:

services:
  app:
    build:
      context: .
    x-podman-buildargs:
      BUILDKIT_INLINE_CACHE: "1"
      BUILDPLATFORM: "linux/amd64"

Conversion Examples #

Docker Compose to Quadlet #

Docker Compose:

version: '3.8'
services:
  web:
    image: nginx:latest
    ports:
      - "8080:80"
    volumes:
      - ./html:/usr/share/nginx/html
    depends_on:
      - app

  app:
    build: .
    environment:
      - NODE_ENV=production

Generated Quadlet Units:

myproject-web.container:

[Unit]
Description=myproject-web container
After=myproject-app.service

[Container]
Image=docker.io/library/nginx:latest
PublishPort=8080:80
Volume=./html:/usr/share/nginx/html
NetworkAlias=web

[Service]
Restart=always

[Install]
WantedBy=default.target

myproject-app.container:

[Unit]
Description=myproject-app container

[Container]
Image=localhost/myproject-app:latest
Environment=NODE_ENV=production
NetworkAlias=app

[Service]
Restart=always

[Install]
WantedBy=default.target

Quad-Ops Validation #

# Test compose conversion without applying
quad-ops sync --dry-run

# Check generated Quadlet units
ls /etc/containers/systemd/

# Validate original compose syntax (optional)
docker-compose -f docker-compose.yml config

Next Steps #