Skip to content

Nipa-Dev/lemon-API

Repository files navigation

Using Testcontainers with Podman

One-time setup

Enable and start the Podman Docker-compatible socket:

systemctl --user enable --now podman.socket

Persistent environment variable

Tell Docker-compatible tools where the socket lives by adding this to your shell config:

export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock
# alternative, should resolve to same path
export DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock

Rootless Podman (important)

In rootless mode, this is usually required or containers may hang or fail to clean up:

export TESTCONTAINERS_RYUK_DISABLED=true

Example to export them, using fish shell

set -Ux DOCKER_HOST unix://$XDG_RUNTIME_DIR/podman/podman.sock
set -Ux TESTCONTAINERS_RYUK_DISABLED true

About

random fastAPI testing playground

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published