'Docker (compose) send to daemon mode without restart
Quite often, when I start my docker-composed app, I like to check that everything started correctly and everything's fine.
So I do docker-compose up
, look at the logs, and then I have to do docker-compose stop
, and docker-compose -d up
.
Those are too many steps and having to stop the container means downtime on my server.
Ain't there a way to send docker to the background?
I tried Ctrl+Z
but then if I try to exit the ssh session, I get There are stopped jobs.
, so that's not the correct way to do this.
I use docker-compose, but I'd be curious if this is possible with docker also.
Thanks
Solution 1:[1]
After Ctrl+z
, just use bg
, the task will start running on background and you are safe to close the ssh session.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | blong |