From 8a7af7a037595659257cb6c67ef76b889b01646f Mon Sep 17 00:00:00 2001 From: Alexis Bellido Date: Sun, 11 Dec 2016 11:23:44 -0500 Subject: [PATCH] move note about VOLUME and host-dir to existing note --- engine/tutorials/dockervolumes.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/engine/tutorials/dockervolumes.md b/engine/tutorials/dockervolumes.md index d282e99b22..b3f322872e 100644 --- a/engine/tutorials/dockervolumes.md +++ b/engine/tutorials/dockervolumes.md @@ -108,10 +108,6 @@ The `host-dir` can either be an absolute path or a `name` value. If you supply an absolute path for the `host-dir`, Docker bind-mounts to the path you specify. If you supply a `name`, Docker creates a named volume by that `name`. -> **Note:** -> The `VOLUME` instruction in a `Dockerfile` does not support -> passing a `host-dir`. - A `name` value must start with an alphanumeric character, followed by `a-z0-9`, `_` (underscore), `.` (period) or `-` (hyphen). An absolute path starts with a `/` (forward slash). @@ -158,10 +154,12 @@ Here you've mounted the same `/src/webapp` directory but you've added the `ro` option to specify that the mount should be read-only. >**Note**: The host directory is, by its nature, host-dependent. For this ->reason, you can't mount a host directory from `Dockerfile` because built images +>reason, you can't mount a host directory from `Dockerfile`, the `VOLUME` +instruction does not support passing a `host-dir`, because built images >should be portable. A host directory wouldn't be available on all potential >hosts. + ### Mount a shared-storage volume as a data volume In addition to mounting a host directory in your container, some Docker