Skip to main content

Posts

Showing posts from November, 2018

kill, stop and pause docker commands

kill, stop and pause docker commands The Docker CLI offers multiple ways to stop container processes. In this short article, we will cover three of those commands, docker kill, docker stop and docker pause. These commands stop container processes without removing the container. The nginx image is used for this tests. In this article we would use commands within docker to investigate the container state when those commands are used. Docker commands used to investigate the container state:
docker top: used to display the running processes of a container.
docker events: get a list of events from the server.
docker stats: shows a live stream of container(s) resource usage statistics.
docker inspect: provides detailed information about the container.
Step to start the test container
Pull the nginx image docker pull nginx
Run the container docker run --name nginx-test -d nginx
docker kill and docker stop commands After running the kill or stop command you would notice that the contained killed …