Reputation: 53938
I have docker-compose.yml
file with a set of services inside. In some cases for development I want docker not to start on of services which is a helper one when I run docker-compose up
.
Is it possible to do and if so, how to?
Upvotes: 3
Views: 895
Reputation: 2955
A possible workaround would be to add a profile to the service
Using profiles with Compose | Docker Docs
version: '3.7'
services:
someservice:
image: someimage
profiles: [profile-to-exclude]
If all the rest of the services have no profile assigned, then all services except for the one with a profile will be run.
docker compose up -d
Runs all services except the one with a profile.
Upvotes: 1