Skip to content

2022λ︎

Build and run Clojure with Multi-stage Dockerfile

Practicalli Clojure Logo

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.

FreeDesktop.org XDG standard for Clojure development tools

Debian Linux Logo

The 🌐 FreeDesktop.org XDG basedir standard defines specific locations to store all user configuration, data files and caches.

Without the XDG standard, these files and directories are often mixed together and stored in the $HOME of the users account, making it more challenging to backup or version control.

Development tools such as NeoVim, Emacs, Clojure CLI and Clojure LSP support the XDG specification, although some tools like Leiningen required a little help. There are simple approaches to work-around the limitations of tools that don't conform.

Building Emacs 28 on Ubuntu Linux

Practicalli Clojure Logo

Emacs 28.1 is a feature packed release and includes native compilation to significantly increase the speed of all Emacs software packages installed. This is a very noticeable difference, especially when Emacs is at the center of your developer workflow.

Ubuntu hasn't packaged Emacs 28.1 yet, although its usually straight forward to build Emacs yourself.