Skip to content

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

Closed
@nathanielks

Description

@nathanielks

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 git@github.com: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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions