Skip to content

Commit 2f49d82

Browse files
yutannihilationCopilotCommanderStorm
authored
docs(dev-guide): Add some note about alternative Docker hosts/runtimes (#2388)
I get this error when I tried to run `cargo test`, and found this is because I use an alternative Docker host (Colima), which locates its docker socket on a different location (`${HOME}/.colima/default/docker.sock`). ``` failures: ---- tiles::postgres::pool::tests::parse_version stdout ---- thread 'tiles::postgres::pool::tests::parse_version' (107274) panicked at martin-core/src/tiles/postgres/pool.rs:239:14: container launched: Client(Init(SocketNotFoundError("/var/run/docker.sock"))) note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace ``` This can be solved by several ways according to the testcontainers crate's documentation. https://docs.rs/testcontainers/latest/testcontainers/index.html#docker-host-resolution This pull request adds a few notes about this. I'm not sure if this is a common issue or not, so please feel free to remove or modify any part that you feel is a bit too specific! --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Frank Elsinga <[email protected]>
1 parent 65d1678 commit 2f49d82

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/src/development.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
Install [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/)
66

7+
> [!TIP]
8+
> Alternative container hosts/runtimes work, but you need to set the `DOCKER_HOST` environment variable to let [the testcontainers module](https://docs.rs/testcontainers/latest/testcontainers/index.html#docker-host-resolution) detect your container.
9+
> For example, [Colima uses a different socket location](https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running).
10+
711
## just
812

913
Install [Just](https://github.com/casey/just#readme):

0 commit comments

Comments
 (0)