Build and run Clojure with Multi-stage Dockerfile
Deployment of a Clojure service is very simple, requiring only an Uberjar (archive file containing the Clojure Project and Clojure run-time) and the Java Run-time Environment (JRE).
A Clojure service rarely works in isolation and although many services are access via a network connection (defined in Environment Variables), provisioning containers to build and run Clojure along with any other services can be valuable as complexity of the architecture grows.
A Multi-stage Dockerfile
is an effective way to build and run Clojure projects in continuous integration pipelines and during local development where multiple services are required for testing.
Docker Hub provides a wide range of images, supporting development, continuous integration and system integration testing.