Docker (compose) send to daemon mode without restart
Asked Answered
C

1

9

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

Chondriosome answered 11/9, 2016 at 19:9 Comment(4)
I guess the is no other way at the moment.Maurene
Do you reckon this would make sense? How about a feature request on github?Chondriosome
Why not just start it in the background first with -d and use docker-compose logs to check the logs?Allier
Indeed but since -d is not a default option, I tend to forget about it in the first place and then find myself stuck...Chondriosome
S
7

After Ctrl+z, just use bg, the task will start running on background and you are safe to close the ssh session.

Sonority answered 25/1, 2018 at 17:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.