All Projects → adzerk-oss → boot-clj-docker-image

adzerk-oss / boot-clj-docker-image

Licence: other
A Docker image with Oracle Java 8 and the latest version of Boot

boot-clj-docker-image

adzerk/boot-clj is a public Docker image that installs and sets up Oracle Java 8 and the latest version of Boot.

This repo is set up as an automated build on Docker Hub. The adzerk/boot-clj Docker image is automatically built from the Dockerfile in this repo and deployed to Docker Hub.

Try It

$ docker run -it adzerk/boot-clj repl

Extend It

To use as a base image for another Dockerfile, put this at the top of your Dockerfile:

FROM adzerk/boot-clj:latest

Cache Maven Artifacts At Build Time

The image is constructed to cache Maven artifacts in /m2, and Boot JAR files in /.boot in the container. You can cache these things at build time in your container by adding commands similar to the following to your Dockerfile:

RUN boot <yourtask>

Assuming that yourtask doesn't block the Boot pipeline it will exit, but not before downloading all of its dependencies into the Maven repository in the container. This way it won't need to download them at runtime.

Setting The Version Of Boot / Clojure

You can use any version of Boot with this image by specifying the BOOT_VERSION. You can do this in a couple of ways:

  • You can make a boot.properties file in your project that specifies the version of Boot and/or Clojure to use,
  • or you can set the BOOT_VERSION and/or BOOT_CLOJURE_VERSION environment variables in your Dockerfile.

boot.properties

BOOT_VERSION=2.3.0
BOOT_CLOJURE_VERSION=1.6.0

Dockerfile

ENV BOOT_VERSION=2.3.0
ENV BOOT_CLOJURE_VERSION=1.6.0

Environment variables set in the Dockerfile will override settings in the boot.properties file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].