Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rancher Desktop instructions #1724

Merged
merged 4 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/system_requirements/rancher.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Using Rancher Desktop

It is possible to use Rancher Desktop to satisfy the system requiremetns instead of Docker.

**IMPORTANT**: Please ensure you are running an up-to-date version of Rancher Desktop. There were some key fixes made in earlier versions (especially around v1.6). It is highly unlikely you will be able to get Rancher Desktop working with testcontainers if you are on an old version.

The instructions below are written on the assumption that:

1. you wish to run Rancher Desktop without administrative permissions (i.e. without granting `sudo` access a.k.a *"Administrative Access"* setting tickbox in Rancher Desktop is *unticked*).
2. you are running Rancher Desktop on an Apple-silicon device a.k.a M-series processor.

Steps are as follows:

1. In Rancher Desktop change engine from `containerd` to `dockerd (moby)`.
2. In Rancher Desktop set `VZ mode` networking.
3. On macOS CLI (e.g. `Terminal` app), set the following environment variables:

```sh
export DOCKER_HOST=unix:/$HOME/.rd/docker.sock
export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock
export TESTCONTAINERS_HOST_OVERRIDE=$(rdctl shell ip a show vznat | awk '/inet / {sub("/.*",""); print $2}')
```

As always, remeber that environment variables are not persisted unless you add them to the relevant file for your default shell e.g. `~/.zshrc`.
udf2457 marked this conversation as resolved.
Show resolved Hide resolved

Credit: Thank you to @pdrosos on GitHub.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ nav:
- system_requirements/ci/travis.md
- system_requirements/using_colima.md
- system_requirements/using_podman.md
- system_requirements/rancher.md
- Contributing:
- contributing.md
- contributing_docs.md
Expand Down