Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Volumes mounted as read-only, is this intentional? #34

Closed
nathanielks opened this issue May 23, 2021 · 3 comments
Closed

Volumes mounted as read-only, is this intentional? #34

nathanielks opened this issue May 23, 2021 · 3 comments
Labels
question Further information is requested

Comments

@nathanielks
Copy link

I was curious to see what sort of filesystem performance gains there were compared to Docker for Mac. I wanted to test a repo that would make a lot of filesystem writes, but in my tests I encountered an error saying the volume was mounted read-only. My apologies for my ignorance, but is this intentional? Should containers launched via lima with volumes be mounted as read-only volumes? For reference, here's how to reproduce:

cd path/to/somewhere
git clone [email protected]:withspectrum/spectrum.git
cd spectrum
lima nerdctl run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app node:14 node shared/install-dependencies.js

This will eventually print the following error:

error Could not write file "/usr/src/app/yarn-error.log": "EROFS: read-only file system, open '/usr/src/app/yarn-error.log'"
error An unexpected error occurred: "EROFS: read-only file system, mkdir '/usr/src/app/node_modules'".

The docker analog that works ok:

docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app node:14 node shared/install-dependencies.js
@AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda added the question Further information is requested label May 24, 2021
@nathanielks
Copy link
Author

Aha, I missed that! Thank you 🙇

@msolimans
Copy link

by default it is read only. to be make it writeable by default do the following:

  • edit the file and set write: true under mount section

$ vim ~/.lima/default/lima.yaml

  • then restart lima
limactl list #this lists all running vms 
limactl stop default #or name of the machine 
limactl start default #or name of the machine 

@lima-vm lima-vm locked and limited conversation to collaborators Nov 6, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants