Timeline for answer to How to mount a host directory in a Docker container by rgaut
Current License: CC BY-SA 4.0
Post Revisions
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 29, 2024 at 14:03 | comment | added | asmaier |
Be aware that order of the parameters matters: docker run ubuntu /bin/bash -t -i -v /tmp:/tmp will not work.
|
|
| Nov 20, 2023 at 2:34 | history | edited | Ynjxsjmh | CC BY-SA 4.0 |
Improved formatting
|
| Jul 11, 2018 at 3:57 | comment | added | Arun | Works perfect. But mounting this way sets the directory owner as root and this also expects the container to be run as root. How do we mount the dir as non-root when the container is run as non-root? | |
| Jan 30, 2017 at 21:29 | comment | added | Stephan Henningsen |
What a nice, clean, to-the-point example to illustrate the host mount option. It could perhaps be improved by using real directory: docker run -t -i -v /tmp:/tmp ubuntu /bin/bash where host /tmp will be mounted on container /tmp. Now one can touch /tmp/hello-world from the container and see the file appear on the host.
|
|
| S Jun 19, 2015 at 16:33 | history | suggested | Fez Vrasta | CC BY-SA 3.0 |
added code quotes
|
| Jun 19, 2015 at 16:03 | review | Suggested edits | |||
| S Jun 19, 2015 at 16:33 | |||||
| Jul 8, 2014 at 21:52 | review | Late answers | |||
| Jul 8, 2014 at 21:53 | |||||
| Jul 8, 2014 at 21:37 | history | answered | rgaut | CC BY-SA 3.0 |