Skip to main content

Running Compose files

With Podman Desktop, you can manage multi-container applications defined in a Compose file.

Prerequisites

Procedure

  • Run the command in a terminal:

    $ podman compose --file compose.yaml up --detach

    (Alternatively) With an older Podman version, run docker-compose:

    1. Set the DOCKER_HOST variable.

    2. Run docker-compose rather than podman compose:

      $ docker-compose --file compose.yaml up --detach

    (Optionally) Learn about Compose commands:

    $ podman compose --help

Verification

  1. The Compose engine starts the containers and services, and adds a label to each resource:

    • Container label: com.docker.compose.project
    • Service label: com.docker.compose.service
  2. Podman Desktop detects the Compose labels, and displays the container group as a group of containers.

    The Podman Desktop Containers list displays the containers created by Compose grouped in a container group with a (compose) suffix, such as flask-redis (compose).

img2