Merge pull request #1833 from aanand/deprecate-relative-volumes-without-dot

Show a warning when a relative path is specified without "./"
(cherry picked from commit 52733f6996)

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>

Conflicts:
	compose/config.py
	tests/unit/config_test.py
This commit is contained in:
Mazz Mosley 2015-08-11 11:21:17 +01:00 committed by Aanand Prasad
commit 5548aa5c79
3 changed files with 75 additions and 7 deletions

View file

@ -131,11 +131,12 @@ Mount paths as volumes, optionally specifying a path on the host machine
volumes:
- /var/lib/mysql
- cache/:/tmp/cache
- ./cache:/tmp/cache
- ~/configs:/etc/configs/:ro
You can mount a relative path on the host, which will expand relative to
the directory of the Compose configuration file being used.
the directory of the Compose configuration file being used. Relative paths
should always begin with `.` or `..`.
> Note: No path expansion will be done if you have also specified a
> `volume_driver`.