diff --git a/README.md b/README.md index f271e66..2c8303e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A Leiningen plugin to generate a [docker](http://www.docker.com/) image that run ## Usage -Put `[com.palletops/uberimage "0.1.3"]` into the `:plugins` vector of your +Put `[com.palletops/uberimage "0.1.4"]` into the `:plugins` vector of your `:user` profile. $ lein uberimage @@ -50,6 +50,21 @@ the container, and the `8080` is the port you want your service to listen to on the host. Then, open your browser and type `http://:8080/...` to access your service. +## Configuration + +The `project.clj` `:uberimage` key can be used to configure the +image's `CMD` and to place extra files into the image. + +```clj +:uberimage {:cmd ["/bin/dash" "/myrunscript" "param1" "param2"] + :files {"myrunscript" "docker/myrunscript"}} + +The `:cmd` value maps directly to a Dockerfile CMD statement + +The `:files` value is a map of additional files to be copied into the +docker image. Keys are docker image target paths and values are lein +project source paths. + ## Limitations Currently your project needs to build with lein uberjar (as `lein diff --git a/ReleaseNotes.md b/ReleaseNotes.md index fe5d31d..4e23739 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,3 +1,22 @@ +## 0.1.4 + +- 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 value maps directly to a Dockerfile CMD statement + + - The :files value is a map of additional files to be copied into the + docker image. Keys are docker image target paths and values are lein + project source paths + + This permits more flexibility in starting the containerized program, + allowing things such as configuring extra environment with a script. + +- Add a CONTRIBUTING.md file + ## 0.1.3 - Reference uberjar with an absolute path diff --git a/project.clj b/project.clj index 8322d78..deccaeb 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject com.palletops/uberimage "0.1.4-SNAPSHOT" +(defproject com.palletops/uberimage "0.1.4" :description "Leiningen plugin to create a docker image for a project uberjar" :url "http://github.com/palletops/lein-uberimage" :license {:name "Eclipse Public License"