I’m having a Vite web app that is running on docker container using file mount method.
so my development changes are reflected in the container. But now i don’t
want to update my local changes to the container. I want to make changes “read-only” in the container.
I’m using the following command to run the container
docker run -v C:NandhaPersonalProjectsDockerDocker_learning:/app:ro -v
/app/node_modules --rm -p 3000:5174 nandhakumarv/docker_learning
But the container is not running. I’m getting the following error
failed to load config from /app/vite.config.ts
error when starting dev server:
Error: EROFS: read-only file system, open '/app/vite.config.ts.timestamp-1719211402347-
b9345a362d8ca.mjs'
at async open (node:internal/fs/promises:641:25)
at async Object.writeFile (node:internal/fs/promises:1224:14)
at async loadConfigFromBundledFile (file:///app/node_modules/vite/dist/node/chunks/dep-
h78lQ5BT.js:66911:5)
at async loadConfigFromFile (file:///app/node_modules/vite/dist/node/chunks/dep-
h78lQ5BT.js:66754:24)
at async resolveConfig (file:///app/node_modules/vite/dist/node/chunks/dep-
h78lQ5BT.js:66364:24)
at async _createServer (file:///app/node_modules/vite/dist/node/chunks/dep-
h78lQ5BT.js:62977:18)
at async CAC.<anonymous> (file:///app/node_modules/vite/dist/node/cli.js:735:20)
How can i make the changes read-only in the container? Thanks in advance.