mirror of
https://github.com/docker/cli.git
synced 2026-09-28 02:06:53 -04:00
Add explicit flags for volume cp/no-cp
This allows a user to specify explicitly to enable automatic copying of data from the container path to the volume path. This does not change the default behavior of automatically copying, but does allow a user to disable it at runtime. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
@@ -434,6 +434,10 @@ change propagation properties of source mount. Say `/` is source mount for
|
||||
> is `slave`, you may not be able to use the `shared` or `rshared` propagation on
|
||||
> a volume.
|
||||
|
||||
|
||||
To disable automatic copying of data from the container path to the volume, use
|
||||
the `nocopy` flag. The `nocopy` flag can be set on bind mounts and named volumes.
|
||||
|
||||
**--volume-driver**=""
|
||||
Container's volume driver. This driver creates volumes specified either from
|
||||
a Dockerfile's `VOLUME` instruction or from the `docker run -v` flag.
|
||||
|
||||
@@ -531,6 +531,7 @@ any options, the systems uses the following options:
|
||||
* [rw|ro]
|
||||
* [z|Z]
|
||||
* [`[r]shared`|`[r]slave`|`[r]private`]
|
||||
* [nocopy]
|
||||
|
||||
The `CONTAINER-DIR` must be an absolute path such as `/src/docs`. The `HOST-DIR`
|
||||
can be an absolute path or a `name` value. A `name` value must start with an
|
||||
@@ -603,6 +604,9 @@ change propagation properties of source mount. Say `/` is source mount for
|
||||
> is `slave`, you may not be able to use the `shared` or `rshared` propagation on
|
||||
> a volume.
|
||||
|
||||
To disable automatic copying of data from the container path to the volume, use
|
||||
the `nocopy` flag. The `nocopy` flag can be set on bind mounts and named volumes.
|
||||
|
||||
**--volume-driver**=""
|
||||
Container's volume driver. This driver creates volumes specified either from
|
||||
a Dockerfile's `VOLUME` instruction or from the `docker run -v` flag.
|
||||
|
||||
Reference in New Issue
Block a user