When I used Docker Desktop for experiment, I found a difference between Stopping with Ctrl+C Docker desktop for Windows and Docker for Linux.
I want to know the difference between them.
I created and run containers using following command using Docker desktop for Windows, and Docker for Linux (Ubuntu).
$ docker run --name test-nginx nginx
When I executed commands in Docker desktop for Windows, and I pressed Ctrl + c , expecting test-nginx container will stop.
But, I executed “docker ps” command, the result is following, it shows the container is not stopping.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bd097c54563e nginx “/docker-entrypoint.…” 2 minutes ago Exited (0) 2 minutes ago test-nginx
When I executed the same “docker run” commands in Docker in Linux, and I pressed Ctrl + c , the test-nginx container stopped. That’s the difference between Docker desktop for Windows and Docker for Linux.