Testcontainers with Podman in Golang

Recently I was working with integration tests in a small project written in Golang. The crucial part of the project is working with a database. The best option to check if service works correctly woth a database is run real database and check changes. Golang has amazing SDK to work with testcontainers. Especially for PostgresSQL I prefer to use the wrapper: https://testcontainers.com/modules/postgresql/?language=go

Because of some policies in my organisastion., I'm not allowd to use docker on a laptop. I use podman. However, testconainers work differently with podman, because in the code testconainers try to communicate with /var/run/docker.sock, that doesn't exists in podman.

It chooses provider based on an environment variable here: https://github.com/testcontainers/testcontainers-go/blob/9b60a589a10ba2842b99393f3ad0b97b055b6785/provider.go#L108

Podman needs some adjustments to work correctly with testcontainers.

https://podman-desktop.io/tutorial/testcontainers-with-podman https://podman-desktop.io/docs/migrating-from-docker/managing-docker-compatibility

The most important is export TESTCONTAINERS_RYUK_DISABLED=true