I have a docker-compose consisting of three images, project_a, project_b, project_c.
I can run:
docker-compose up -d
which will start all the images in the background not printing their output to the current shell.
I can also just start a specific image by:
docker-compose up project_b
Yet this will print the log of project_b to the shell.
Hence, I thought I can just run:
docker-compose up project_b -d
Yet this will throw:
ERROR: No such service -d
How to just start one container in a docker-compose stack in the background?
Order does matter, as:
docker-compose -d project_b
will run fine. If the option flag is at the end, it will be read as an image name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With