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

docker compose file fails with libcompose passes with docker-compose CLI #513

Open prashanthjbabu opened 5 years ago

prashanthjbabu commented 5 years ago

Here is the docker compose file

{"networks":{"default":{}},"services":{"helloworld":{"container_name":"helloworld","environment":["TEST=hello"],"image":"tutum/hello-world","networks":{"default":{}}}},"version":"2.0","volumes":{}}

This docker compose file fails with libcompose but works with docker-compose CLI. Narrowed down the problem to : ERRO[0000] Failed Starting helloworld : Error response from daemon: page not found ERRO[0000] Failed to start: helloworld : Error response from daemon: page not found

The page not found from daemon was because of the following API call :

/v1.20/networks/connect - This is incorrect as the right API call is POST /networks/(id or name)/connect. As you can see (id or name) is missing . This is because networks is set to default.

thalesfsp commented 5 years ago

I'm having the same problem :(

This is because networks is set to default.

@prashanthjbabu what that means?

Is this problem related to the libcompose (master branch) or Docker version? cc: @vdemeester

prashanthjbabu commented 5 years ago

@thalesfsp I noticed that removing "networks":{"default":{}} from the above JSON works.