codekitchen / dinghy-http-proxy

the http proxy container that dinghy uses
MIT License
125 stars 43 forks source link

docker-compose down fails #23

Closed seeruk closed 7 years ago

seeruk commented 7 years ago

Hi there,

When creating a Docker Compose environment with a version 2 syntax compose file, the Dinghy HTTP Proxy seems to prevent the use of docker-compose down.

docker-compose down tries to delete the network that is created for the environment, but fails because the Dinghy HTTP Proxy is still in the network, running. Even if the rest of the environment is not.

It seems that the network should be left once there are no more other containers running in it - or, if possible, that is should react to docker-compose down being run, and leave then (otherwise with the first method it may not be fast enough and could still fail I suppose?)

Are there any other workarounds to this? I know docker-compose down isn't exactly a common thing, but I'm using it because I'm testing a script for use in a CI environment where I will need it to clean up after itself!

codekitchen commented 7 years ago

There was an issue filed for this over in the dinghy project a while back, https://github.com/codekitchen/dinghy/issues/218 . I'm not sure if he is still planning to send over a PR with a fix.

As a potential workaround, it might be possible to have your CI script do a docker network disconnect to manually remove the dinghy proxy from the network before shutting it down.

codekitchen commented 7 years ago

I've pushed a fix for this, see https://github.com/codekitchen/dinghy/issues/218