Home > OS >  Ctrl-c Not stopping Docker Container from running in Git Bash
Ctrl-c Not stopping Docker Container from running in Git Bash

Time:12-21

I am trying to stop Docker container using Ctrl C in Git Bash but it is not: enter image description here

I tried to Pressing Ctrl C for 5 sec as it suggested in a solution on how to stop tomcat in Git Bash if Ctrl C is not working.

CodePudding user response:

When you do

docker run redis

the container isn't running interactively and with an attached TTY, so your ctrl-c never reaches the container. If you do

docker run -it redis

ctrl-c will be sent to redis and the container will stop.

  • Related