Skip to content

Commit 1a1fdde

Browse files
authored
Add docs to run Testcontainers using Podman (#7447)
1 parent eaeb40b commit 1a1fdde

File tree

1 file changed

+29
-0
lines changed
  • docs/supported_docker_environment

1 file changed

+29
-0
lines changed

docs/supported_docker_environment/index.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,35 @@ export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock
3131
export DOCKER_HOST="unix://${HOME}/.colima/default/docker.sock"
3232
```
3333

34+
## Podman
35+
36+
In order to run testcontainers against [podman](https://podman.io/) the env vars bellow should be set
37+
38+
MacOS:
39+
40+
```bash
41+
{% raw %}
42+
export DOCKER_HOST=unix://$(podman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}')
43+
export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock
44+
{% endraw %}
45+
```
46+
47+
Linux:
48+
49+
```bash
50+
export DOCKER_HOST=unix://${XDG_RUNTIME_DIR}/podman/podman.sock
51+
```
52+
53+
If you're running Podman in rootless mode, ensure to include the following line to disable Ryuk:
54+
55+
```bash
56+
export TESTCONTAINERS_RYUK_DISABLED=true
57+
```
58+
59+
!!! note
60+
Previous to version 1.19.0, `export TESTCONTAINERS_RYUK_PRIVILEGED=true`
61+
was required for rootful mode. Starting with 1.19.0, this is no longer required.
62+
3463
## Docker environment discovery
3564

3665
Testcontainers will try to connect to a Docker daemon using the following strategies in order:

0 commit comments

Comments
 (0)