iamdork / compose

Command line replacement for docker-compose, adding dork magics.
MIT License
2 stars 2 forks source link

no way to stop/restart dork-compose containers #19

Closed ohthehugemanatee closed 7 years ago

ohthehugemanatee commented 7 years ago

After my last dork container has exited, I still get

docker ps
CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS              PORTS                                      NAMES
30cf52409bb5        vault                    "docker-entrypoint.sh"   10 days ago         Up 50 minutes       0.0.0.0:8200->8200/tcp                     dork_aux_vault_vault_1
89db5ec20dcb        andyshinn/dnsmasq:2.75   "dnsmasq -k -A /dork."   10 days ago         Up 50 minutes       0.0.0.0:53->53/tcp, 0.0.0.0:53->53/udp     dork_aux_dns_dns_1
ca077b14e38d        iamdork/dockergen        "/usr/local/bin/docke"   10 days ago         Up 50 minutes                                                  dork_aux_proxy_dockergen_1
76b28260097d        iamdork/nginx-proxy      "nginx -g 'daemon off"   10 days ago         Up 50 minutes       0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   dork_aux_proxy_nginx_1

There's no way to end these containers without a manual docker stop.

sepal commented 7 years ago

I find this issue quite annoying as well, therefore I looked into the code to see if I could create some PR to fix this issue.

I found this LoC/comment. So apperently it used to shutdown the containers, but it didn't always work? Can we renable that feature, if it at least works most of time? Or did it never work?

Alternatively we could also introduce a new command, which shutsdown all containers created by dork. This should be possible, since we have the meta containers and labels, right? What should the command be called? dork-compose shutdown ?

pmelab commented 7 years ago

The best route would be fixing the comment @sepal pointed out. If an auxiliary project is not attached to any networks, it should be shut down. We need to find out why it didn't work all the time.

pmelab commented 7 years ago

Auxiliary services will shut down now if no more projects require them.