Welcome to the Linux Foundation Forum!

Lab 9.1 Read-only Volume


Somehow, docker couldn't find the /tmp/ro directory I created

kaisong@ubuntu-vm:~$ ls /tmp/ro
kaisong@ubuntu-vm:~$ docker container run -ti --mount type=bind,source=/tmp/ro,target=/data,readonly --name crovol alpine sh
docker: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /tmp/ro.
See 'docker run --help'.

I tried with the other directory (/mnt/shared from the previous exercise), and I was able to create the read-only mount without any problem. What did I miss? Is there anything special about the /tmp directory?


Upcoming Training