Skip to content
Nx Cloud CI is in private beta 10.6× faster average CI time with 79% less compute. Join the beta
Back to Knowledge Base

Nx Cloud CI images

Every Nx Cloud CI job and every worker runs in the image its launch template sets under image. The ubuntu24.04-node24.22-v2 and ubuntu26.04-node24.22-v1 images include common command-line tools such as jq, yq, gh, and zip.

Both images contain the same tools. ubuntu24.04-node24.22-v2 is built on Ubuntu 24.04 and ubuntu26.04-node24.22-v1 on Ubuntu 26.04. Versions are listed where the image pins one. Every other package comes from the apt repository of that Ubuntu release, so its version follows the release.

Steps run as the workflows user in /home/workflows/workspace. The workflows user has passwordless sudo.

  • Node.js 24.22.1, installed with nvm, and the npm that ships with it
  • corepack, enabled
  • pnpm 10
  • Yarn 1.22.22 (Yarn classic), so yarn outside a project runs Yarn 1 without a download
  • bun and bunx 1.4.5
  • Go 1.26
  • OpenJDK 17
  • Python 3, with python pointing to python3, plus pip, pipx, venv, and the headers that pip needs to build C extensions
  • gcc, g++, and make
  • PowerShell 7.6.10 (pwsh)

pip install works outside a virtual environment, because /etc/pip.conf sets break-system-packages = true. /home/workflows/.local/bin is on PATH, so commands from pip install --user and pipx install are found.

  • Google Chrome, on amd64 machines only
  • Xvfb and the system libraries Cypress and Playwright need

The images don't include the Playwright or Cypress browser downloads. The chromium-browser and firefox packages are installed, but on Ubuntu 24.04 and later they're transition packages for snaps, and their commands don't run.

GroupCommands
JSON and YAMLjq, yq 4.54.3 (the mikefarah yq)
Gitgit, git-lfs, gh (GitHub CLI)
Archiveszip, unzip, xz, zstd, bzip2, lz4, pigz, brotli, 7z
Shell utilitiesfile, tree, /usr/bin/time, parallel, shellcheck, aria2c
Networkcurl, wget, rsync, ssh, dig, ping, nc (OpenBSD netcat), netstat, ip
Buildautoconf, automake, libtoolize, pkg-config, sqlite3, and the OpenSSL, SQLite, and libyaml headers
Pythonpython, pip, pipx, python -m venv
Systemsudo, gpg, the en_US.UTF-8 locale (generated, not set as the default), and time zone data (tzdata)
Mediaffmpeg
DockerDocker CLI 28.3.1 (docker) with the Compose and Buildx plugins
JavaScript runtimesnode, bun, bunx

On the Ubuntu 26.04 image, 7z comes from the 7zip package and dig from bind9-dnsutils. On Ubuntu 24.04 they come from p7zip-full and dnsutils.

The Docker CLI needs a Docker daemon to build or run containers. Docker-in-Docker runs on a dedicated compute cluster.

The workflows user has passwordless sudo, so a step can install any Ubuntu package with sudo apt-get install.

Put setup steps in init-steps, either the job's own init-steps or those of every launch template the job and its workers use. By default, workers run a job's inline init-steps too. Workers don't run the job's steps. A tool installed in a job step exists only on the main job's machine, and tasks that Nx Cloud sends to workers can't find it.

.nx/pipelines/ci.yaml
launch-templates:
linux-medium-tools:
resource-class: 'docker_linux_amd64/medium'
image: 'ubuntu24.04-node24.22-v2'
init-steps:
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v6/workflow-steps/checkout/main.yaml'
- name: Install extra packages
script: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends protobuf-compiler

The nx-cloud-workflows repository has steps that install toolchains:

StepWhat it installs
install-nodeA Node.js version with nvm, from the node_version input, an .nvmrc file, or volta.node in package.json, in that order
install-misemise, then the tools in mise.toml or in the tools input
install-rust-if-presentrustup and cargo, when the repository tracks a Cargo.toml, Cargo.lock, or rust-toolchain.toml in any directory. Installs the toolchain each rust-toolchain.toml names
install-java-if-presentJava through mise, when the repository tracks a build.gradle, build.gradle.kts, settings.gradle, settings.gradle.kts, or pom.xml in any directory. Defaults to Java 21. Skips when the workspace root has a mise config file

The if-present steps look for their files, so put them after checkout:

.nx/pipelines/ci.yaml
launch-templates:
linux-medium-jvm-rust:
resource-class: 'docker_linux_amd64/medium'
image: 'ubuntu24.04-node24.22-v2'
init-steps:
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v6/workflow-steps/checkout/main.yaml'
- name: Install Rust (if Rust project)
uses: 'nrwl/nx-cloud-workflows/v6.1/workflow-steps/install-rust-if-present/main.yaml'
- name: Install Java (if JVM project)
uses: 'nrwl/nx-cloud-workflows/v6.1/workflow-steps/install-java-if-present/main.yaml'

The images leave out these tools because of their size:

Run each install in an init-steps script, with sudo where the guide uses it, as in install other tools. Language toolchains beyond the ones listed in image contents, such as Rust, aren't included either. Install them with install-mise or one of the if-present steps.

Set image in your launch template to ubuntu24.04-node24.22-v2 or ubuntu26.04-node24.22-v1. Pick the image for the Ubuntu release your steps need.

To keep a pre-built template's name and steps, copy it from the pre-built templates into .nx/pipelines/ci.yaml and change image. A template defined in ci.yaml is used instead of a pre-built template with the same name.

.nx/pipelines/ci.yaml
launch-templates:
linux-medium-js:
resource-class: 'docker_linux_amd64/medium'
image: 'ubuntu24.04-node24.22-v2'
init-steps:
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v6/workflow-steps/checkout/main.yaml'
# ...the rest of the init-steps from the pre-built linux-medium-js template

Jobs and workers that name linux-medium-js then start from the new image.

A job can also set its machine inline, with resource-class, image, and init-steps in place of runs-on. Set image on the job, and its workers start from the same image and run the same init-steps, unless the job's workers names another launch template.

.nx/pipelines/ci.yaml
jobs:
main:
resource-class: 'docker_linux_amd64/medium'
image: 'ubuntu24.04-node24.22-v2'
init-steps:
- name: Checkout
uses: 'nrwl/nx-cloud-workflows/v6/workflow-steps/checkout/main.yaml'
workers: 3
steps:
- run: npx nx affected -t lint test build

Last updated: