-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: docker socket detection on unix (#721)
Docker Desktop on macOS creates the socket in the user's home directory from version 4.13.0.[[1](https://github.com/docker/for-mac/issues/6529)][[2](https://github.com/testcontainers/testcontainers-java/issues/6165)] And the Docker team [has the intention to move away](docker/for-mac#6529 (comment)) from the root-owned `/var/run/docker.sock` There is a option named `Allow the default Docket Socket to be used (requires password)` in the Docker Desktop, but the created symbolic link `/var/run/docker.sock` [doesn't persist](lando/lando#3533 (comment)) between OS restart or OS upgrade. Without this patch or creating a symbolic link, macOS devs have to face the ```called `Result::unwrap()` on an `Err` value: Client(Init(SocketNotFoundError("/var/run/docker.sock")))``` error. I have used `Cow` to avoid the need of cloning the fields of `Config` struct. I am open to suggestion or other approaches. Thanks! --------- Co-authored-by: Artem Medvedev <[email protected]>
- Loading branch information
Showing
4 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters