Skip to content

Podman set up

michalovjan edited this page Aug 23, 2021 · 1 revision

Podman set-up

If you don't have a docker on your machine but have podman installed (Hi Fedora/RHEL users (^_^)/) there is an unofficial way to get testcontainers to work. This method was tested with podman 3.2.3 and Fedora 34.

  1. Start podman.socket user service with systemctl --user start podman.socket
    • to check whether service started: systemctl list-sockets --user
    • to troubleshoot podman.service: podman system service -t 0 --log-level=debug
    • if you can't start podman.socket service, try installing podman-remote package with yum/dnf/apt-get
  2. Add export DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock to .bashrc(.zshrc)
  3. Create/Edit ~/.config/containers/registries.conf and add unqualified-search-registries=["docker.io", "quay.io"]
  4. Create/Edit ~/.config/containers/containers.conf and add
    • [service_destinations.local]
      uri = "unix:///run/user/1000/podman/podman.sock"
      
    • This is to get the podman cli to talk to the user service (1000 is my UID, probably yours as well).
  5. Log out and log in

TIP: If you don't want to start podman.socket service on each log in, you can enable it to start automatically with systemctl --user enable --now podman.socket

Clone this wiki locally