Helo,
I have a java .jar file that takes a bunch of arguments as input when i run it from the terminal.I want to make a docker image and run it that contains the jar file where i can still pass the arguments for the jar file.
Helo,
I have a java .jar file that takes a bunch of arguments as input when i run it from the terminal.I want to make a docker image and run it that contains the jar file where i can still pass the arguments for the jar file.
Set the jar file as your entrypoint and the args as your command
An example:
ENTRYPOINT ["/path/to/my/java.jar"]
CMD ["my", "default", "args"]
You can then override the args whenever you run the container, using:
docker run <my-docker-image> some custom args
More information here: http://goinbigdata.com/docker-run-vs-cmd-vs-entrypoint/