If I knew anything more than the basics of Go, I'd try to implement this myself. I still might try just for the exercise, but it won't be quick.
It appears that RemoveContainer implements the equivalent of the docker command "rm -f", instead of stop/rm. The outcome of this is that when "rocker-compose rm" is run, it fails to register a Docker event that the container has stopped. This means that service registration tools (such as gliderlabs/registrator), fail to notice and de-register the services that the container was providing.
For example: I run an infrastructure that uses Consul for dynamic service registration and gliderlabs/registrator to register container services as they are deployed. I deploy a container using rocker-compose run..., the container is deployed, and registrator registers the available services with Consul. I run rocker-compose rm ..., the container is removed, but the registered services are orphaned in Consul since no docker event is registered.
This is similar to the scenario where you run docker rm -f ... from the command line.
docker-compose has a "down" option that does a clean stop/rm procedure, which results in a Docker event that registrator fires on to de-register the container services in Consul.
It would be useful if there were another rocker-compose command that did the same thing as docker-compose down.
If I knew anything more than the basics of Go, I'd try to implement this myself. I still might try just for the exercise, but it won't be quick.
It appears that RemoveContainer implements the equivalent of the docker command "rm -f", instead of stop/rm. The outcome of this is that when "rocker-compose rm" is run, it fails to register a Docker event that the container has stopped. This means that service registration tools (such as gliderlabs/registrator), fail to notice and de-register the services that the container was providing.
For example: I run an infrastructure that uses Consul for dynamic service registration and
gliderlabs/registrator
to register container services as they are deployed. I deploy a container usingrocker-compose run...
, the container is deployed, andregistrator
registers the available services with Consul. I runrocker-compose rm ...
, the container is removed, but the registered services are orphaned in Consul since no docker event is registered.This is similar to the scenario where you run
docker rm -f ...
from the command line.docker-compose
has a "down" option that does a clean stop/rm procedure, which results in a Docker event thatregistrator
fires on to de-register the container services in Consul.It would be useful if there were another rocker-compose command that did the same thing as
docker-compose down
.