-
Notifications
You must be signed in to change notification settings - Fork 142
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
fix: docker socket detection on unix #721
Conversation
✅ Deploy Preview for testcontainers-rust ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thank you @mominul for the contribution and detailed description! 🚀 |
Hi @mominul 👋 Thank you one more time! |
Hello @DDtKey! Sorry for the delay in implementing the changes; I'll try to implement them by next week. Thanks! 😄 |
… socket path in unix platforms
@DDtKey I have addressed your suggestions, can you have a look at it please? |
Remove the user id dependent fallback socket path
@DDtKey Can you have another look at this, please? I have removed the user id dependent socket path fallback until we get demand to add it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you a lot for the contribution! 🙏
## 🤖 New release * `testcontainers`: 0.21.1 -> 0.22.0 <details><summary><i><b>Changelog</b></i></summary><p> <blockquote> ## [0.22.0] - 2024-08-30 ### Details #### Bug Fixes - [❗] Docker socket detection on unix ([#721](#721)) #### Features - Add `working_dir` to `ContainerRequest`,`ImageExt` ([#724](#724)) #### Miscellaneous Tasks - Added `#![forbid(unsafe_code)]` to the library ([#722](#722)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Docker Desktop on macOS creates the socket in the user's home directory from version 4.13.0.[1][2]
And the Docker team has the intention to move away 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 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 ofConfig
struct. I am open to suggestion or other approaches.Thanks!