{"user":"library","name":"clojure","namespace":"library","repository_type":"image","status":1,"status_description":"active","description":"Clojure is a dialect of Lisp that runs on the JVM.","is_private":false,"is_automated":false,"star_count":364,"pull_count":42758765,"last_updated":"2026-11-24T14:42:57.605168Z","last_modified":"2026-10-12T19:12:42.550901Z","date_registered":"2014-08-25T14:56:27.655111Z","collaborator_count":0,"affiliation":null,"hub_user":"stackbrew","has_starred":false,"full_description":"# Quick reference\n\n-\t**Maintained by**:  \n\t[the Docker Community](https://github.com/Quantisan/docker-clojure)\n\n-\t**Where to get help**:  \n\t[the Docker Community Slack](https://dockr.ly/comm-slack), [Server Fault](https://serverfault.com/help/on-topic), [Unix \u0026 Linux](https://unix.stackexchange.com/help/on-topic), or [Stack Overflow](https://stackoverflow.com/help/on-topic)\n\n# Supported tags and respective `Dockerfile` links\n\n**Note:** the description for this image is longer than the Hub length limit of 25000, so the \"Supported tags\" list has been trimmed to compensate.  See also [docker/hub-feedback#238](https://github.com/docker/hub-feedback/issues/238) and [docker/roadmap#475](https://github.com/docker/roadmap/issues/475).\n\n-\tSee [\"Supported tags and respective `Dockerfile` links\" at https://github.com/docker-library/docs/tree/master/clojure/README.md](https://github.com/docker-library/docs/tree/master/clojure/README.md#supported-tags-and-respective-dockerfile-links)\n\n# Quick reference (cont.)\n\n-\t**Where to file issues**:  \n\t[https://github.com/Quantisan/docker-clojure/issues](https://github.com/Quantisan/docker-clojure/issues?q=is:issue+is:pr)\n\n-\t**Supported architectures**: ([more info](https://github.com/docker-library/official-images#architectures-other-than-amd64))  \n\t[`amd64`](https://hub.docker.com/r/amd64/clojure/), [`arm64v8`](https://hub.docker.com/r/arm64v8/clojure/), [`ppc64le`](https://hub.docker.com/r/ppc64le/clojure/)\n\n-\t**Published image artifact details**:  \n\t[repo-info repo's `repos/clojure/` directory](https://github.com/docker-library/repo-info/blob/master/repos/clojure) ([history](https://github.com/docker-library/repo-info/commits/master/repos/clojure))  \n\t(image metadata, transfer size, etc)\n\n-\t**Image updates**:  \n\t[official-images repo's `library/clojure` label](https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fclojure)  \n\t[official-images repo's `library/clojure` file](https://github.com/docker-library/official-images/blob/master/library/clojure) ([history](https://github.com/docker-library/official-images/commits/master/library/clojure))\n\n-\t**Source of this description**:  \n\t[docs repo's `clojure/` directory](https://github.com/docker-library/docs/tree/master/clojure) ([history](https://github.com/docker-library/docs/commits/master/clojure))\n\n# What is Clojure?\n\nClojure is a dialect of the Lisp programming language. It is a general-purpose programming language with an emphasis on functional programming. It runs on the Java Virtual Machine, Common Language Runtime, and JavaScript engines. Like other Lisps, Clojure treats code as data and has a macro system.\n\n\u003e [wikipedia.org/wiki/Clojure](http://en.wikipedia.org/wiki/Clojure)\n\n![logo](https://raw.githubusercontent.com/docker-library/docs/665526c3b12cedfd721234cedb61e8433f73b75a/clojure/logo.png)\n\n# How to use this image\n\n## Build tools\n\nClojure has three major approaches to building and running projects:\n\n1.\t[leiningen](https://leiningen.org)\n\t1.\tThe oldest and probably most common tool\n2.\t[boot](http://boot-clj.com)\n\t1.\tAn alternative approach that solves similar problems as leiningen\n3.\t[tools-deps](https://clojure.org/guides/deps_and_cli)\n\t1.\tA more recent official tool for some of the lein/boot use cases\n\nThere are variants of this image for all three of these tools and their respective releases. The most basic form of these tags is:\n\n1.\t`clojure:lein`\n2.\t`clojure:boot`\n3.\t`clojure:tools-deps`\n\nBut you can also append a hyphen and the version of that tool you'd like to use. For example, for lein 2.8.1 you can use this image: `clojure:lein-2.8.1`.\n\n## Run your app with leiningen\n\nAdd a `Dockerfile` to an existing Leiningen/Clojure project with the following contents:\n\n```dockerfile\nFROM clojure\nCOPY . /usr/src/app\nWORKDIR /usr/src/app\nCMD [\"lein\", \"run\"]\n```\n\nThen, run these commands to build and run the image:\n\n```console\n$ docker build -t my-clojure-app .\n$ docker run -it --rm --name my-running-app my-clojure-app\n```\n\nWhile the above is the most straightforward example of a `Dockerfile`, it does have some drawbacks. The `lein run` command will download your dependencies, compile the project, and then run it. That's a lot of work, all of which you may not want done every time you run the image. To get around this, you can download the dependencies and compile the project ahead of time. This will significantly reduce startup time when you run your image.\n\n```dockerfile\nFROM clojure\nRUN mkdir -p /usr/src/app\nWORKDIR /usr/src/app\nCOPY project.clj /usr/src/app/\nRUN lein deps\nCOPY . /usr/src/app\nRUN mv \"$(lein uberjar | sed -n 's/^Created \\(.*standalone\\.jar\\)/\\1/p')\" app-standalone.jar\nCMD [\"java\", \"-jar\", \"app-standalone.jar\"]\n```\n\nWriting the `Dockerfile` this way will download the dependencies (and cache them, so they are only re-downloaded when the dependencies change) and then compile them into a standalone jar ahead of time rather than each time the image is run.\n\nYou can then build and run the image as above.\n\n## Compile your Lein/Clojure project into a jar from within the container\n\nIf you have an existing Lein/Clojure project, it's fairly straightforward to compile your project into a jar from a container:\n\n```console\n$ docker run -it --rm -v \"$PWD\":/usr/src/app -w /usr/src/app clojure lein uberjar\n```\n\nThis will build your project into a jar file located in your project's `target/uberjar` directory.\n\n## More details\n\nSee [the official image README](https://github.com/Quantisan/docker-clojure/blob/master/README.md) for more details about using this image with boot and tools-deps.\n\n# Image Variants\n\nThe `clojure` images come in many flavors, each designed for a specific use case.\n\n## `clojure:\u003cversion\u003e`\n\nThis is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.\n\nSome of these tags may have names like bookworm or trixie in them. These are the suite code names for releases of [Debian](https://wiki.debian.org/DebianReleases) and indicate which release the image is based on. If your image needs to install any additional packages beyond what comes with the image, you'll likely want to specify one of these explicitly to minimize breakage when there are new releases of Debian.\n\nSome of these tags may have names like jammy, noble, or resolute in them. These are the suite code names for releases of [Ubuntu](https://wiki.ubuntu.com/Releases) and indicate which release the image is based on. If your image needs to install any additional packages beyond what comes with the image, you'll likely want to specify one of these explicitly to minimize breakage when there are new releases of Ubuntu.\n\n## `clojure:\u003cversion\u003e-slim`\n\nThis image does not contain the common packages contained in the default tag and only contains the minimal packages needed to run `clojure`. Unless you are working in an environment where *only* the `clojure` image will be deployed and you have space constraints, we highly recommend using the default image of this repository.\n\n## `clojure:\u003cversion\u003e-alpine`\n\nThis image is based on the popular [Alpine Linux project](https://alpinelinux.org), available in [the `alpine` official image](https://hub.docker.com/_/alpine). Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.\n\nThis variant is useful when final image size being as small as possible is your primary concern. The main caveat to note is that it does use [musl libc](https://musl.libc.org) instead of [glibc and friends](https://www.etalabs.net/compare_libcs.html), so software will often run into issues depending on the depth of their libc requirements/assumptions. See [this Hacker News comment thread](https://news.ycombinator.com/item?id=10782897) for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.\n\nTo minimize image size, it's uncommon for additional related tools (such as `git` or `bash`) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the [`alpine` image description](https://hub.docker.com/_/alpine/) for examples of how to install packages if you are unfamiliar).\n\n# License\n\nView [license information](http://clojure.org/license) for the software contained in this image.\n\nAs with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).\n\nSome additional license information which was able to be auto-detected might be found in [the `repo-info` repository's `clojure/` directory](https://github.com/docker-library/repo-info/tree/master/repos/clojure).\n\nAs for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.","permissions":{"read":true,"write":false,"admin":false},"media_types":["application/octet-stream","application/vnd.docker.container.image.v1+json","application/vnd.docker.distribution.manifest.list.v2+json","application/vnd.docker.distribution.manifest.v1+prettyjws","application/vnd.oci.image.index.v1+json"],"content_types":["unrecognized","image"],"categories":[{"name":"Languages \u0026 frameworks","slug":"languages-and-frameworks"}],"immutable_tags_settings":{"enabled":false,"rules":[".*"]},"storage_size":4232260012885,"source":null}