palletops/lein-uberimage — pull request #6 by mccraigmccraig (2014-08-21 22:23:20+00:00)
Title: specify command and extra files in project.clj

allows config to be given in project.clj with the form :

:uberimage {:cmd ["/bin/dash" "/myrunscript" "param1" "param2"]
:files {"myrunscript" "docker/myrunscript"}}

the :cmd maps directly to the Dockerfile CMD statement, and :files is a map of
additional files to be copied into the docker image, with docker image paths as keys
and lein project source paths as values

this permits more flexibility in starting the containerized program, to e.g.
configure extra environment with a script

an example : i have a need to discover the container's gateway address, because there is an HAProxy listening there, fronting one of the containerized programs service dependencies : it's trivial to do if i can add a script to the docker image, and exec the uberjar from that script