docker / libcompose

*Unmaintained/Deprecated* An experimental go library providing Compose-like functionality
https://godoc.org/github.com/docker/libcompose
Apache License 2.0
585 stars 191 forks source link

libcompose is failing while building from other directories #449

Closed surajnarwade closed 7 years ago

surajnarwade commented 7 years ago

I have following two types of docker-compose files,

$ cat compose-test/build.yml 
version: "2"
services:
    foo:
        build: "./build"
        command: "sleep 3600"
$ cat compose-test/context.yml 
version: "2"
services:
    foo:
        build:
            context: "./build"
        command: "sleep 3600"

and I am getting following output:

$ libcompose -f compose-test/build.yml build
WARN[0000] Note: This is an experimental alternate implementation of the Compose CLI (https://github.com/docker/compose) 
ERRO[0000] Failed Building foo : Cannot locate Dockerfile: Dockerfile 
ERRO[0000] Failed to start: foo : Cannot locate Dockerfile: Dockerfile 
Cannot locate Dockerfile: Dockerfile
$ libcompose -f compose-test/context.yml build
WARN[0000] Note: This is an experimental alternate implementation of the Compose CLI (https://github.com/docker/compose) 
WARN[0000] Error while reading .dockerignore (trycintext/build/.dockerignore) : open trycintext/build/.dockerignore: no such file or directory 
INFO[0000] Building trycintext_foo...                   
Sending build context to Docker daemon  2.048kB
Step 1 : FROM busybox
 ---> 7968321274dc
Step 2 : RUN touch /test
 ---> Using cache
 ---> f9eca053598c
Successfully built f9eca053598c

libcompose is failing for first docker-compose file while performing build from other ditrectories