Skip to content

Commit 202680e

Browse files
sunilarjuneddumelendezkiview
authored
Proposing Update to index.md - Env Settings for Rancher Desktop (#7591)
Co-authored-by: Eddú Meléndez Gonzales <[email protected]> Co-authored-by: Kevin Wittek <[email protected]>
1 parent 209ab2e commit 202680e

File tree

1 file changed

+28
-0
lines changed
  • docs/supported_docker_environment

1 file changed

+28
-0
lines changed

docs/supported_docker_environment/index.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,34 @@ export TESTCONTAINERS_RYUK_DISABLED=true
6060
Previous to version 1.19.0, `export TESTCONTAINERS_RYUK_PRIVILEGED=true`
6161
was required for rootful mode. Starting with 1.19.0, this is no longer required.
6262

63+
## Rancher Desktop
64+
65+
In order to run testcontainers against [Rancher Desktop](https://rancherdesktop.io/) the env vars below should be set.
66+
67+
If you're running Rancher Desktop as an administrator in a MacOS (M1) machine:
68+
69+
Using QEMU emulation
70+
71+
```bash
72+
export TESTCONTAINERS_HOST_OVERRIDE=$(rdctl shell ip a show rd0 | awk '/inet / {sub("/.*",""); print $2}')
73+
```
74+
75+
Using VZ emulation
76+
77+
```bash
78+
export TESTCONTAINERS_HOST_OVERRIDE=$(rdctl shell ip a show vznat | awk '/inet / {sub("/.*",""); print $2}')
79+
```
80+
81+
If you're not running Rancher Desktop as an administrator in a MacOS (M1) machine:
82+
83+
Using VZ emulation
84+
85+
```bash
86+
export DOCKER_HOST=unix://$HOME/.rd/docker.sock
87+
export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock
88+
export TESTCONTAINERS_HOST_OVERRIDE=$(rdctl shell ip a show vznat | awk '/inet / {sub("/.*",""); print $2}')
89+
```
90+
6391
## Docker environment discovery
6492

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

0 commit comments

Comments
 (0)