Skip to content

Build image

Workers Builds uses a build image with support for a variety of languages and tools such as Node.js, Python, PHP, Ruby, and Go.

Supported Tooling

Workers Builds supports a variety of runtimes, languages, and tools. Builds will use the default versions listed below unless a custom version is detected or specified. You can override the default versions using environment variables or version files. All versions are available for override.

Runtime

ToolDefault versionEnvironment variableFile
Go1.23.0GO_VERSION
Node.js22.9.0NODE_VERSION.nvmrc, .node-version
Python3.12.5PYTHON_VERSION.python-version, runtime.txt
Ruby3.3.5RUBY_VERSION.ruby-version

Tools and langauges

ToolDefault versionEnvironment variable
Bun1.1.33BUN_VERSION
Hugoextended_0.134.3HUGO_VERSION
npm10.8.3
yarn4.5.0YARN_VERSION
pnpm9.10.0PNPM_VERSION
pip24.2
gem3.5.19
poetry1.8.3
pipx1.7.1
bundler2.4.10

Advanced Settings

Overriding Default Versions

If you need to override a specific version of a language or tool within the image, you can specify it as a build environment variable, or set the relevant file in your source code as shown above.

To set the version using a build environment variables, you can:

  1. Find the environment variable name for the language or tool and desired version (e.g. NODE_VERSION = 22)
  2. Add and save the environment variable on the dashboard by going to Settings > Build > Build Variables and Secrets in your Workers project

Or, to set the version by adding a file to your project, you can:

  1. Find the filename for the language or tool (e.g. .nvmrc)
  2. Add the specified file name to the root directory and set the desired version number as the file's content. For example, if the version number is 22, the file should contain '22'.

Skip dependency install

You can add the following build variable to disable automatic dependency installation and run a custom install command instead.

Build variableValue
SKIP_DEPENDENCY_INSTALL1 or true

Pre-installed Packages

In the following table, review the pre-installed packages in the build image. The packages are installed with apt, a package manager for Linux distributions.

curllibbz2-devlibreadline-dev
gitlibc++1libssl-dev
git-lfslibdb-devlibvips-dev
unziplibgdbm-devlibyaml-dev
autoconflibgdbm6tzdata
build-essentiallibgbm1wget
bzip2libgmp-devzlib1g-dev
gnupgliblzma-devzstd
libffi-devlibncurses5-dev

Build Environment

Workers Builds are run in the following environment:

Build EnvironmentUbuntu 24.04
Architecturex86_64