Signed-off-by: Andrew C. Bodine <acbodine@us.ibm.com>
| ... | ... |
@@ -51,8 +51,15 @@ directory from your own host into a container. |
| 51 | 51 |
|
| 52 | 52 |
$ sudo docker run -d -P --name web -v /src/webapp:/opt/webapp training/webapp python app.py |
| 53 | 53 |
|
| 54 |
-This will mount the local directory, `/src/webapp`, into the container as the |
|
| 55 |
-`/opt/webapp` directory. This is very useful for testing, for example we can |
|
| 54 |
+This will mount the host directory, `/src/webapp`, into the container at |
|
| 55 |
+`/opt/webapp`. |
|
| 56 |
+ |
|
| 57 |
+> **Note:** |
|
| 58 |
+> If the path `/opt/webapp` already exists inside the container's image, it's |
|
| 59 |
+> contents will be replaced by the contents of `/src/webapp` on the host to stay |
|
| 60 |
+> consistent with the expected behavior of `mount` |
|
| 61 |
+ |
|
| 62 |
+This is very useful for testing, for example we can |
|
| 56 | 63 |
mount our source code inside the container and see our application at work as |
| 57 | 64 |
we change the source code. The directory on the host must be specified as an |
| 58 | 65 |
absolute path and if the directory doesn't exist Docker will automatically |