Skip to content
Advertisement

How to deploy stack with docker-java client?

How to deploy stack with docker-java client?

ex) docker stack deploy –compose-file docker-compose.yml stackdemo

Is there any function to run this command in java client?

Advertisement

Answer

If you want to execute multiple commands I suggest you to write a shell script file and execute it from the java code.

JavaScript

Another option if you want to only run 1 command you can use ProcessBuilder

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement