Docker-DCO-1.1-Signed-off-by: Tom Fotherby <github@tomfotherby.com> (github: tomfotherby)
| ... | ... |
@@ -73,17 +73,21 @@ option to specify that the mount should be read-only. |
| 73 | 73 |
|
| 74 | 74 |
### Mount a Host File as a Data Volume |
| 75 | 75 |
|
| 76 |
-As well as directories, the `-v` flag can be used to mount a single file from the host into a container. |
|
| 76 |
+As well as directories, the `-v` flag can be used to mount a single file from |
|
| 77 |
+the host into a container. |
|
| 77 | 78 |
|
| 78 | 79 |
$ sudo docker run --rm -it -v ~/.bash_history:/.bash_history ubuntu /bin/bash |
| 79 | 80 |
|
| 80 |
-This will drop you into a bash shell in a new container, you will have your bash history from your host and when |
|
| 81 |
-you exit the container, the host will have the history of the commands typed while in the container. |
|
| 81 |
+This will drop you into a bash shell in a new container, you will have your bash |
|
| 82 |
+history from your host and when you exit the container, the host will have the |
|
| 83 |
+history of the commands typed while in the container. |
|
| 82 | 84 |
|
| 83 | 85 |
> **Note:** |
| 84 |
-> Many tools used to edit files including `vi` and `sed --in-place` may result in a inode change. Since docker v1.1.0 |
|
| 85 |
-> this will produce a error such as "*sed: cannot rename ./sedKdJ9Dy: Device or resource busy*". In the case where you |
|
| 86 |
-> want to edit the mounted file, it is often easiest to instead mount the parent directory. |
|
| 86 |
+> Many tools used to edit files including `vi` and `sed --in-place` may result |
|
| 87 |
+> in a inode change. Since docker v1.1.0 this will produce a error such as |
|
| 88 |
+> "*sed: cannot rename ./sedKdJ9Dy: Device or resource busy*". In the case where |
|
| 89 |
+> you want to edit the mounted file, it is often easiest to instead mount the |
|
| 90 |
+> parent directory. |
|
| 87 | 91 |
|
| 88 | 92 |
## Creating and mounting a Data Volume Container |
| 89 | 93 |
|