Detection

migetpacks detects a Clojure application when either of the following files is present in the project root:
  • project.clj (Leiningen)
  • deps.edn (Clojure CLI/tools.deps)

Version Detection

Clojure Version

Clojure version is resolved in the following priority order:

Leiningen Version

Leiningen version is detected from:

Java Version

The JDK version used for compilation and runtime is read from:

Build Process

migetpacks uses the official clojure:temurin-{java}-lein Docker image which includes Leiningen and the JDK:

Uberjar Detection

migetpacks detects custom uberjar names from project.clj:
If :uberjar-name is specified, migetpacks uses it when configuring the run command.

Run Command

The default run command for Clojure applications:
Override with RUN_COMMAND or a Procfile:

JVM Configuration

The following environment variables are set for production:

Caching

Layer Caching

Dependencies are cached by copying project.clj before the full source:

BUILD_CACHE_DIR

When BUILD_CACHE_DIR is set, Leiningen and Maven caches persist at:

DHI Support

Docker Hardened Images are supported for Clojure runtime.
Clojure uses a hybrid approach: the official Clojure build image (which includes Leiningen) for building, and a DHI distroless image for runtime.

DHI Notes

  • The build image is always the official Clojure image (DHI does not provide Clojure/Leiningen images).
  • Only the runtime stage uses DHI distroless Eclipse Temurin JRE.
  • Java version is read from system.properties (default: 21).
  • Runtime images are distroless (no shell).

Example with DHI

Example

With custom JVM options