I wanted to create a install script which would stand up certain services based on user input. I am using docker for the managing these services. With docker-compose I am able to define multiple services, but by default all the services defined in docker-compose.yml start. Is there any workaround for this ? Also, is this a terrible strategy [but all my services use docker, so is there an alternate way] ?
Thanks!
Do you mean:
docker-compose up SERVICE
?
That should start a single service and any linked containers. You can also do:
docker-compose run SERVICE [COMMAND] [ARGS...]
which might be better for you depending on your needs, has some differences from up
in how it's executed. See: https://docs.docker.com/compose/reference/run/
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