Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop docker-compose run command

I'm using a node docker with a simple aplication created with strongloop I want start arc slc arc instead the default command slc run

my app is called app in the docker-compose.yml file, I run the following command

$ docker-compose run app slc run

Arc starts but I can't stop the command, I've tried CTRL + C

like image 685
rkmax Avatar asked Feb 03 '26 16:02

rkmax


1 Answers

You might need to add the following lines to your docker-compose file since you're running it in the foreground:

tty: true
stdin_open: true

This will send the signal to the container application instead.

If that doesn't work, I would just run the application as a daemon using the -d flag.

docker-compose run app slc run -d

You can stop or kill using:

docker-compose stop
docker-compose kill
docker stop [container names]
docker kill [container names]

Running the docker-compose commands will stop or kill all of the running containers, you can add individual container names after the command if you only want to kill individual containers.

like image 157
mohoromitch Avatar answered Feb 05 '26 07:02

mohoromitch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!