Interpret 'build:' as relative to the yml file

* This fix introduces one side-effect: the build parameter is now
validated early, when the service dicionary is first constructed.
That leads to less scary stack traces when the path is not valid.

* The tests for the changes introduced here alter the fixtures
of those (otherwise unrelated) tests that make use of the 'build:'
parameter)

Signed-off-by: Moysés Borges Furtado <moyses.furtado@wplex.com.br>
This commit is contained in:
Moysés Borges 2015-03-29 17:06:35 -03:00 committed by Moysés Borges Furtado
commit 8584525e8d
7 changed files with 56 additions and 4 deletions

View file

@ -29,8 +29,9 @@ image: a4bc65fd
### build
Path to a directory containing a Dockerfile. This directory is also the
build context that is sent to the Docker daemon.
Path to a directory containing a Dockerfile. When the value supplied is a
relative path, it is interpreted as relative to the location of the yml file
itself. This directory is also the build context that is sent to the Docker daemon.
Compose will build and tag it with a generated name, and use that image thereafter.