Start Building for Free
CircleCI.comAcademyBlogCommunitySupport
  • cimg/clojure
  • Getting Started
  • How This Image Works
  • Image Tags
  • Variants
    • Node.js
    • Browsers
  1. Convenience Images
  2. cimg/clojure

cimg/clojure

Sections

This image is designed to supercede the original CircleCI Clojure image, circleci/clojure.

cimg/clojure is a Docker image created by CircleCI with continuous integration builds in mind. Each tag contains a Clojure version, a JVM, and any binaries and tools that are required for builds to complete successfully in a CircleCI environment.

Getting Started

This image can be used with the CircleCI docker executor. For example:

1 2 3 4 5 6 7 jobs: build: docker: - image: cimg/clojure:1.11.1 steps: - checkout - run: lein version

In the above example, the CircleCI Clojure Docker image is used for the primary container. More specifically, the tag 1.11.1 is used meaning the version of Clojure will be Clojure v1.11.1. You can now use Clojure within the steps for this job.

How This Image Works

This image contains the Clojure programming language as installed via clj as well as Leiningen. These Clojure images contain OpenJDK with support for v8, v11, v17

Babashka is pre-installed. Please note that Babashka has frequent releases while CircleCI only releases Clojure images as the upstream project makes a release. There will be times were the pre-installed version of Babashka is older than you might want.

Tagging Scheme

This image has the following tagging schemes:

Standard tagging. This scheme will point to a specified default version of OpenJDK, which is currently 17.0

cimg/clojure:<clojure-version>[-variant]

Specific OpenJDK support:

cimg/clojure:<clojure-version>-<openjdk-version>[-variant]

<clojure-version> - The version of Clojure to use. This can be a full SemVer point release (such as 1.10.1) or just the minor release (such as 1.10). If you use the minor release tag, it will automatically point to future patch updates as they are released by the Clojure Team. For example, the tag 1.10 points to Clojure v1.10.1 now, but when the next release comes out, it will point to Clojure v1.10.2.

<openjdk-version> - The version of OpenJDK to use. This portion of the tag only uses major.minor syntax, but is built from the corresponding openjdk image found here (like 17.0).

[-variant] - Variant tags can optionally be used like this. With the node variant for example, it could be used like this: cimg/clojure:1.10-node or cimg/clojure:1.10-openjdk-17-node.

Image Tags

Variants

Variant images typically contain the same base software, but with a few additional modifications.

Node.js

The Node.js variant is the same Clojure image but with Node.js also installed. The Node.js variant can be used by appending -node to the end of an existing cimg/clojure tag.

1 2 3 4 5 6 7 jobs: build: docker: - image: cimg/clojure:1.10.3-node steps: - checkout - run: node --version

Browsers

The browsers variant is the same Clojure image but with Node.js, Selenium, and browser dependencies pre-installed via apt. The browsers variant can be used by appending -browser to the end of an existing cimg/clojure tag. The browsers variant is designed to work in conjunction with the CircleCI Browser Tools orb. You can use the orb to install a version of Google Chrome and/or Firefox into your build. The image contains all of the supporting tools needed to use both the browser and its driver.

1 2 3 4 5 6 7 8 9 10 11 12 orbs: browser-tools: circleci/browser-tools@1.1 jobs: build: docker: - image: cimg/clojure:1.10.3-browsers steps: - browser-tools/install-browser-tools - checkout - run: | node --version google-chrome --version
Developer Updates
Get tips to optimize your builds
Or join our research panel and give feedback
By submitting this form, you are agreeing to ourTerms of UseandPrivacy Policy.