palletops / lein-uberimage

A Leiningen plugin to generate a docker image that runs a project's uberjar.
Eclipse Public License 1.0
136 stars 10 forks source link

Use ENTRYPOINT rather than CMD. #24

Closed sw1nn closed 3 years ago

sw1nn commented 9 years ago

This changes the default way the docker image runs. The motivation is to be able to use the images created here as command line tools. e.g.

$ lein uberimage
...
Built image 123asdf131 [test/image]

docker run -it test/image --arg1 param1

Previously you would have to do this:

docker run -it test/image /usr/bin/java -jar /uberjar.jar --arg1 param1

You still have the option to not have an entrypoint, but you must explicitly define that with :entrypoint nil in the project.clj config.

sw1nn commented 3 years ago

Tidying up