Control docker-compose in Java
问题 I created a fairly amount of docker-compose scripts which spawn up several services. I now want to control docker-compose in the JVM. Basically, I want to be able to execute up and down , ideally with -p <project name> parameter, so I can spawn multiple instances at the same time. Is this possible in Java? 回答1: There might be two possible approaches that you can take: Run docker-compose up/down using normal command executor (e.g. with the help of ProcessBuilder and run OS command) Using