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

[11.x] Added section for compatibility for Docker Desktop for Linux. #9962

Open
wants to merge 1 commit into
base: 11.x
Choose a base branch
from

Conversation

RyanPaiva56
Copy link

@RyanPaiva56 RyanPaiva56 commented Oct 18, 2024

There's been a handful of issues posted about file access problems with docker on Linux. After reading through all of the issues on Laravel Sail and then other related issues posted to Docker Desktop for Linux, the actual issue is that Docker Desktop runs in a VM and doesn't have write permissions unless you explicitly set them and add the host user to that group.

The current warning on the Laravel docs doesn't resolve the issue, basically you're just disabling Docker Desktop (haha) by switching contexts, and so I removed the previous stop-gap and replaced it. Docker Desktop will only work within its desktop-linux context because it's hard coded to do so within a VM. Docker Desktop also automatically changes the context from default to desktop-linux on start and stop, so changing the context is going to be an annoying thing you have to do every time forever. The fix added via this PR makes a permanent fix until Docker adds the ability for Docker Desktop to handle additional contexts, which they don't appear to have any plans for and cite security and stability as the reasons they don't want to touch it.

Also, other solutions basically have you run sail as root or disable rootless docker, neither of which are good. The solution in this PR reasonably limits the amount of files given write access without invoking root.

I also moved it to the top under intro just below where the docs state other compatibilites. It doesn't make sense for it to be farther down the page because you can't start sail without errors unless you do this first.

This PR also removes some whitespace that appears unnecessary.

Credit to @Ernestopheles for the original solution: cytopia/devilbox#963 (comment)

This PR likely resolves these issues:

laravel/sail#646
laravel/sail#548
laravel/sail#459
laravel/sail#457
laravel/sail#435
laravel/sail#372
laravel/sail#149
laravel/sail#81

@rojtjo
Copy link

rojtjo commented Oct 19, 2024

This PR also removes some whitespace that appears unnecessary.

These actually add line breaks in Markdown.
See: https://www.markdownguide.org/basic-syntax/#line-breaks

@RyanPaiva56
Copy link
Author

Thanks, it didn't show up on my preview but I'll take care of it and resubmit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants