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

Include additional instructions in Dockerfiles #14

Closed trampoline closed 10 years ago

trampoline commented 10 years ago

Allows the insertion of additional Dockerfile instructions

The :instructions value is taken from the :uberimage options map in project.clj and specifies a list of Dockerfile instructions to be inserted immediately after the FROM instruction at the start of the Dockerfile.

Motivation was the shellshock vulnerability : I needed a way to do a dist-upgrade on the base-image and not to have to wait for upstream base-images to be updated.

hugoduncan commented 10 years ago

Looks useful - merged.

I wonder if we should allow an optional keyword marker in :instructions to specify where the generated instructions should be inserted, rather than always putting them at the end.

trampoline commented 10 years ago

Prior to shellshock I was thinking that it might be worth allowing a Dockerfile prelude to be specified as a file, then just suffixing command, jar and additional files to that : it would mean that more complex requirements could be easily expressed in a familiar format.

Shellshock gave me a need for a quick, and therefore simple, fix : and this was that