rakitin
rakitin

Reputation: 2175

Run docker containers in detatched mode selectively

I’m starting up a few containers with a docker-compose.yml file. I would like all of them to start in detached mode except for one, which i would like to run attached.

I can pass the detach flag on the command line with

docker-compose up -d

But I wonder if it’s possible to specify this in the yml file?

Upvotes: 1

Views: 77

Answers (1)

pacuna
pacuna

Reputation: 2089

You could try docker-compose up -d service_name for the dettached ones and just docker-compose up service_name for the other.

Not possible to declare in the compose file as far as I know.

Upvotes: 1

Related Questions