Is there any way to disable a service in docker-compose.yml
问题 I find myself in the situation, that I want to disable a service temporarily in a docker-compose file. Of course I could comment it out, but is there any option to just say " enabled: false " ? 回答1: You could simply redefine the entrypoint or command in order to replace said command with something which does nothing ( /bin/true ) That would make the container exit immediately, doing nothing. shadi adds the following tips in the comments: If you don't want the service to get built at all,