5

How i use docker-composer file in podman?

This examples:

version: '3.7'
services:
  gitea:
    image: gitea/gitea:latest
    environment:
      - DB_TYPE=postgres
      - DB_HOST=db:5432
      - DB_NAME=
      - DB_USER=
      - DB_PASSWD=
    restart: always
    volumes:
      - git_data:/data
    ports:
      - 3000:3000

Generate image using dockerfile normal?

GabrielPiassa
  • 61
  • 1
  • 4

2 Answers2

2

The upcoming Podman 3.0 supports the Docker REST API well enough to be used as back-end for docker-compose. It is planned to be released in a few weeks (see Podman releases).

Caveats:

  • Running Podman as root is supported, but not yet running as a normal user, i.e. running "rootless". (See feature request)

  • Functionality relating to Swarm is not supported

To enable Podman as the back-end for docker-compose, run

 sudo systemctl enable --now start podman.socket

Podman will then listen on the UNIX domain socket /var/run/docker.sock

See also: https://www.redhat.com/sysadmin/podman-docker-compose

Erik Sjölund
  • 10,690
  • 7
  • 46
  • 74
0

Cross-posted from this question

  1. Ensure podman is installed on your machine.
  2. In a terminal, install podman compose with the following command:
pip3 install https://github.com/containers/podman-compose/archive/devel.tar.gz
  1. cd into the directory your docker-compose file is located in
  2. Run podman-compose up

See the following link for a decent introduction