I have several containers which are described in a docker-compose-<service>.yaml
file each, and which I start with
docker-compose -f docker-compose-<service>.yaml up -d
I then see via docker ps
the container running.
I expected that I could stop that container via
docker-compose -f docker-compose-<service>.yaml down
The container is however not stopped. Neither it is when I use the comane above with stop
instead of down
.
Doing a docker kill <service>
stops the container.
My question: since all my services started with docker-compose
are effectively one container for each docker-compose-<service>.yaml
file, can I use the bare docker
command to stop it?
Or more generally speaking: is docker-compose
simply a helper for underlying docker
commands which means that using docker
is always safe (from a "consistency in using different commands" perspective)?