Install
JCM is not released yet, so neither the launcher nor the tools image is published. Until they are, you need access to the JCM repository, Git and bash, as well as Docker. Clone the repository, using the address that came with your access, and build the image once:
git clone https://example.invalid/jcm.git
cd jcm
bash cli/build-image.sh
The build compiles JCM inside Docker and takes about six minutes on a four-core machine with nothing cached; later builds
reuse most of it. Give Docker at least 8 GB of memory and 10 GB of free disk: jcm check alone uses more than 4 GB.
Leave the checkout, since your applications do not belong inside it, and put the launcher on your path so that jcm is
a command wherever you are. On macOS and Linux:
cd ..
export PATH="$PWD/jcm/cli:$PATH"
That lasts for this terminal. To keep it, add the same line to your shell's profile (~/.zshrc or ~/.bashrc), with
the folder written out in full. On Windows, use jcm\cli\jcm.cmd from this folder.
You need Docker running Linux containers. What is supported:
| Docker | Status |
|---|---|
| Docker Desktop on macOS (Apple silicon and Intel) | Supported; cli/test-cli.sh runs on it |
| Docker Desktop on Windows (WSL 2, Linux containers) | Supported; the launcher is tested with a stand-in Docker, the tools image itself is not run on Windows in CI |
| Docker Engine 23 or later on Linux, rootful | Supported; CI runs everything on it |
| Docker Desktop on Linux | Expected to work; not yet run on a real host. The launcher mounts the socket inside Docker Desktop's VM (/var/run/docker.sock), not the context's ~/.docker/desktop/docker.sock, and passes no uid (Docker Desktop writes shared files as you). Tested with a stand-in Docker only |
| Docker Engine on Linux, rootless | Expected to work; not yet run on a real host. The launcher takes the socket from DOCKER_HOST or the current context and leaves the uid alone (the container's root is you). Tested with a stand-in Docker only |
| Linux with SELinux enforcing (Fedora, RHEL) | Expected to work; not yet run on a real host. The tools container runs with --security-opt label=disable: SELinux does not confine that one container, so it reads your project and Docker's socket as you do, and nothing on your machine is relabelled (no :z, which would relabel the folder you started in, your home folder included). Tested with a stand-in Docker only |
| Podman (with podman-docker) | Not tested; not known to work |
| colima, OrbStack and other Docker engines on macOS | Not tested |
| colima, Rancher Desktop or Lima on Linux | Not tested. The launcher takes a context socket under your home folder for an engine in a VM and mounts that VM's /var/run/docker.sock |
A tcp:// or ssh:// DOCKER_HOST, or a remote context | Refused with a sentence on every system: a remote engine cannot mount this machine's project folder |
Docker's socket is your machine. Whatever holds Docker's socket can start a container that mounts any folder of
this machine, so it can do anything your user can (and, with rootful Docker, more). The launcher gives the socket only
to jcm run and to jcm check --db postgres (whose tests start PostgreSQL in a container), and says so on the console
for the check. Treat those two as running the project's own code with your rights: the project's build, its plugins
and its dependencies run there. Plain jcm check, jcm publish (both of its containers) and every other command get
no socket.
From the first release, these commands will put the launcher on your PATH instead. They do not work yet.
macOS and Linux:
sudo mkdir -p /usr/local/bin && sudo curl -fsSL -o /usr/local/bin/jcm https://example.invalid/jcm/releases/latest/download/jcm && sudo chmod +x /usr/local/bin/jcm
Windows (PowerShell; puts jcm.ps1 and jcm.cmd in %LOCALAPPDATA%\jcm and adds that folder to your PATH once):
$d="$env:LOCALAPPDATA\jcm"; mkdir -Force $d >$null; foreach ($f in 'jcm.ps1','jcm.cmd') { iwr -useb "https://example.invalid/jcm/releases/latest/download/$f" -OutFile "$d\$f" }; $p=[Environment]::GetEnvironmentVariable('Path','User'); if (($p -split ';') -notcontains $d) { [Environment]::SetEnvironmentVariable('Path', "$p;$d", 'User') }
No checksum can be checked yet: the release assets these lines name, and a .sha256 beside each, are published with
the first release.
The first command you run pulls the tools image jcm-tools:<version>, the launcher's own version, and the first
build fills the jcm-cache volume with Gradle, Maven and Node downloads (about 1 GB, several minutes); later
runs reuse it.
JCM_TOOLS_IMAGE=<image> makes the launcher run another image, for example one you built with another tag.