Skip to content

Commit

Permalink
Remove volume_driver from v3 reference.
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Nephin <[email protected]>
  • Loading branch information
dnephin committed Mar 13, 2017
1 parent 8e78e1a commit 673de3b
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions compose/compose-file/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1054,18 +1054,16 @@ more information.
> [deploying a stack in swarm mode](/engine/reference/commandline/stack_deploy.md)
> with a (version 3) Compose file.
### volumes, volume\_driver
### volumes

> **Note:** The top-level
> [`volumes` option](#volume-configuration-reference) defines
> a named volume and references it from each service's `volumes` list. This replaces `volumes_from` in earlier versions of the Compose file format.
Mount paths or named volumes, optionally specifying a path on the host machine
(`HOST:CONTAINER`), or an access mode (`HOST:CONTAINER:ro`).
For [version 2 files](compose-versioning.md#version-2), named volumes need to be specified with the
Named volumes must be defined in the
[top-level `volumes` key](#volume-configuration-reference).
When using [version 1](compose-versioning.md#version-1), the Docker Engine will create the named
volume automatically if it doesn't exist.

You can mount a relative path on the host, which will expand relative to
the directory of the Compose configuration file being used. Relative paths
Expand All @@ -1087,22 +1085,7 @@ should always begin with `.` or `..`.
# Named volume
- datavolume:/var/lib/mysql

If you do not use a host path, you may specify a `volume_driver`.

volume_driver: mydriver

There are several things to note, depending on which
[Compose file version](compose-versioning.md#versioning) you're using:

- `volume_driver` is not supported at all in
[version 3](compose-versioning.md#version-3). Instead of setting the volume driver
on the service, define a volume using the
[top-level `volumes` option](#volume-configuration-reference)
and specify the driver there.

- No path expansion will be done if you have also specified a `volume_driver`.
For example, if you specify a mapping of `./foo:/data`, the `./foo` part
will be passed straight to the volume driver without being expanded.

See [Docker Volumes](/engine/userguide/dockervolumes.md) and
[Volume Plugins](/engine/extend/plugins_volume.md) for more information.
Expand Down

0 comments on commit 673de3b

Please sign in to comment.