It is possible to stop/remove/start separate containers even though you have deployed the containers using compose all at the same time.
When you log in to your Docker host, run the following command:
$ docker ps
In the NAMES column you'll see the names of the containers. These names look something like oneginimsp_proxy1_1 and oneginimsp_engine1_1.
To stop/remove/start these separate containers you'll need to strip the name. The only part you will need is engine1. This is the name of the service as mentioned in this KB article.
An important notice is that you should use docker-compose to stop/remove/start the containers. When you don't use docker-compose, the name will be generated by docker and the container will not be part of the 'compose stack' anymore.
To stop a specific container, use the following command:
$ docker-compose -f <<path to docker-compose.yml>> stop engine1
To remove a specific container, use this command:
$ docker-compose -f <<path to docker-compose.yml>> remove engine1
To start a specific container (in detach mode), use this command:
$ docker-compose -f <<path to docker-compose.yml>> up -d engine1
Comments
0 comments
Please sign in to leave a comment.