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

Error EACCES: permission denied when running the (development) live-reload server on macOS with Docker Desktop + VirtIOFS #5096

Closed
dduportal opened this issue Apr 28, 2022 · 1 comment
Labels

Comments

@dduportal
Copy link
Contributor

dduportal commented Apr 28, 2022

What is the problem?

When executing the target make run on macOS, with Docker Desktop and the new VirtIOfs file sharing enabled, then an error EACCES: permission denied is thrown by the npm install step (running inside the container).
The error changes on each run, but is always located in a subdirectory of node_modules: it seems that the call from npm to mkdir in order to create these sub directories is having an unexpected behavior: the directory is created, with the correct permissions, but the syscall still fails at the end which results in npm failing to install dependencies.

Short Term Fix

  • Disable VirtIOfs on your Docker Desktop installation (works fine, but performances are clearly below, and Docker Desktop consumes more resources)
  • Or prefer a local NodeJS/npm instalaltion instead of the Docker image (export USE_LOCAL_NODE=true -
    if [ -n "${USE_LOCAL_NODE}" ]; then
    )

Long Term Fix

I intend to send a PR, but anyone interested in fixing this is welcome.
Expect some delays as I want to report this behavior to Docker Inc. to help them improve the VirtIOfs coverage.

But the main idea is to clean up:

  • I don't see any reason to share the node_modules directory between the container and the host. It's only taking a toll on the performances, and complicates things too much
  • The amount of shellcheck issues on these script is insane.

Really Long Term / Paradigm Change

That could be a great opportunity for anyone interested to check if https://dagger.io/ couldn't be a tool to stop writing an insane amount of makefile/shell/node code.

References

@dduportal dduportal added the bug label Apr 28, 2022
@dduportal
Copy link
Contributor Author

Thanks to the help of Docker Inc'. people, this problem is now fixed.

Solution: upgrade to Docker Desktop 4.7.1 (or later).

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

No branches or pull requests

1 participant