Skip to content

tests: basic support for podman with testcontainers#119

Merged
ahouene merged 5 commits intoPowerDNS:mainfrom
ahouene:testcontainers-podman
Feb 3, 2026
Merged

tests: basic support for podman with testcontainers#119
ahouene merged 5 commits intoPowerDNS:mainfrom
ahouene:testcontainers-podman

Conversation

@ahouene
Copy link
Contributor

@ahouene ahouene commented Jan 7, 2026

For all sorts of reasons one might prefer using Podman over Docker, but testcontainers won't pick that up out of the box.

This PR adds support for Podman in test.sh in order to fill the gap.

Podman will be used if DOCKER_HOST is undefined and no Docker endpoint is configured.
Setting SB_TESTS_FORCE_PODMAN to a non-empty value will use Podman regardless of Docker.

@ahouene ahouene requested review from Luit and neilcook January 7, 2026 16:29
@ahouene ahouene self-assigned this Jan 7, 2026
@Luit
Copy link
Contributor

Luit commented Feb 3, 2026

Personally, I'd prefer the script to look for a running non-root podman socket first, and fall back to Docker. Might not be as easy to set as default for Darwin, but would that be okay to default to on Linux?

Copy link
Contributor

@Luit Luit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on my side. The DOCKER_HOST override works as advertised as well, tested using eval $(minikube docker-env); ./test.sh.

I fixed this inside VSCode (actually VSCodium right now) with the following in my settings.json:

  "go.testEnvVars": {
    "TESTCONTAINERS_RYUK_DISABLED": "true",
    "DOCKER_HOST": "unix:///run/user/1000/podman/podman.sock"
  },

Ship it.

@ahouene ahouene merged commit 6d1a2b3 into PowerDNS:main Feb 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants