Closed
Description
This is an interesting question, should we or should we not limit this to read-only mounted filesystems? If we think about how a docker container is run with `-v /path:/path`, the contents of the docker container can never populate the mounted `/path`.
Originally posted by @mafredri in #183 (comment)
Currently, mounting in read-write volumes results in their contents not being available inside the container:
$ echo 'important stuff' >> /opt/important-stuff/tps-reports.txt
$ ls -l /opt/important-stuff/tps-reports.txt
-rw-r--r-- 1 cian 16 May 13 21:12 /opt/important-stuff/tps-reports.txt
$ docker run -it --rm \
-v /opt/important-stuff:/opt/important-stuff \
-e GIT_URL=https://github.com/coder/envbuilder-starter-devcontainer \
-e INIT_SCRIPT=bash \
envbuilder:latest
[...]
devcontainer # ls -l /opt/important-stuff/
total 0
devcontainer # exit
$ cat /opt/important-stuff/tps-reports.txt
important stuff
Can we extend #183 to include all volumes mounted in?
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]feat: handle rw mounts[/-][+]feat: temporarily move rw mounts during image build[/+]DanielleMaywood commentedon Nov 5, 2024
I'm unable to reproduce the behaviour mentioned.
Attempting to reproduce this on our dogfood instance
Attempting to reproduce this on a Ubuntu 24.04 VM