A repository that holds a devcontainer file
A build leaves a devcontainer file out. This holds for a repository’s own file and for the file of its control plane. The build log has one line that names the file that the build left out, and the repository that holds it:outerlayer runner image --repository <owner/name> builds on the universal
image and prints the same line. See
outerlayer runner image.
A code review runs on the universal image and says nothing about the file.
Move off a devcontainer file
Each part of a devcontainer file has a place outside the file:
A microVM build runs no root setup script. A microVM build has no way to
install a system package yet.
The runtimes in the universal image
Every build runs on the universal image. The image is built on Ubuntu 24.04. It holds Node, Python, Go, Java, Ruby and Rust, each in more than one version. The image takes several gigabytes of the host’s disk. A build picks the version that a repository asks for. The runner reads these version files in each checkout and installs what they name:- A
mise.tomlfile can name tools beyond these runtimes, and the runner installs them. mise is the version manager that the image uses. - The
package.jsonfile does not choose the Node version. - A runtime with no version file runs at the image’s default version.
runner.build.allowHosts applies. A refused download fails the build with
runtime_install_failed, and the reason names the host. The build log lists
each version and the file that chose it.
After the install, the runner runs each repository’s
setup script.
The image also holds these tools:
- Yarn, through Corepack. Corepack downloads the version that the
packageManagerfield ofpackage.jsonnames, the first time a build runs it. Yarn 1 comes fromregistry.yarnpkg.com, and a later Yarn fromrepo.yarnpkg.com. - pnpm, as its own program. The first time a build runs it, pnpm downloads the
version that
package.jsonpins, fromregistry.npmjs.org. The pin is thepackageManagerfield or thedevEngines.packageManagerfield. pnpm reads the pin of the project it works on, sopnpm -C web installuses the pin inweb. pnpm downloads the pinned version whateveronFailthedevEngines.packageManagerfield sets. A project with no pin gets the image’s version. Amise.tomlfile can name another version. - uv, pipx, poetry, Maven and Gradle. A
mise.tomlfile can name another version. - git, Git LFS, curl,
jq,unzip, a C compiler withmake, and clang with libclang. A checkout holds a pointer file for each file that LFS tracks. To fetch the files, rungit lfs pullin the setup script. - The
sqlite3andpsqlclients, ripgrep, and common command-line tools such asless,wget,zip,rsync,ssh,lsof,straceandgdb. - ImageMagick (
convert) and libvips, both with their headers, poppler’s PDF tools (pdftoppmandpdftotext), and ffmpeg withffprobe. The image has no Ghostscript, so ImageMagick cannot read PDF or PostScript files. - The Docker client (
docker), with the compose and buildx plugins. The image has no Docker daemon. See Builds that need Docker. - Chromium. See Chromium and Playwright.
Variables from mise
After the runtime install, the runner runsmise env in the primary checkout.
Every command of the build gets the variables that mise reports there. These
are JAVA_HOME, GOROOT and GOBIN, and the [env] values of the
repository’s mise.toml. So a program such as a Maven wrapper script finds
JAVA_HOME.
Every command’s PATH starts with the folder of each tool that mise chose. So
a program finds each tool at the version that the primary checkout pins. The
build log names each variable, with no value, and the folders.
These rules apply:
- A variable that you set wins over the value from mise: one in
runner.build.variables, or one in the factory’s build variables for a managed build. - A variable that the runner sets itself keeps the runner’s value.
- The values come from the primary checkout. A command in another checkout
finds the same versions first. To run a tool at the version that its own
folder pins, run it through mise, for example
mise exec -- node --version.
Unpinned runtimes
A repository can use a runtime and not pin its version. The runner finds the runtimes from the repository’s manifests, such aspackage.json, go.mod and
Cargo.toml. It sets OUTERLAYER_UNPINNED_RUNTIMES for the build’s command.
The value is JSON, keyed by repository:
Chromium and Playwright
The universal image holds the Chromium that matches Playwright 1.64.1, with the system libraries it needs. A build uses it to capture screenshots and videos as proof. The image keeps the browser in/ms-playwright, and the
build user cannot write to that folder.
Before the build’s commands run, the runner links each browser in
/ms-playwright into $HOME/.cache/ms-playwright. That folder is
Playwright’s default, and PLAYWRIGHT_BROWSERS_PATH names it in the build. A
tool that drops the variable, such as turbo, finds the same folder.
A repository that uses another Playwright version installs its own browser
into that folder. Put this command in the setup script, which
needs no root access:
Tools that the image lacks
The setup script and the build’s command cannot install a system package. Their root filesystem is read-only, and they run as the build user. In a container build and a sandbox build, install a system package with a root setup script,.outerlayer/setup-root.sh. The runner runs it as root
before any step of the build. See
Install system packages with a root setup script.
A microVM build runs no root setup script. There, and for a tool that needs
no root, install the tool into the build user’s home, in the
setup script. The
saved state holds the home, so a later build
does not install the tool again.
- A runtime. Name its version in a version file. See The runtimes in the universal image.
- A tool that a package manager installs for one user. Use
cargo install,npm install --global,pipx installorgo install. Each one writes into the home. - Any other tool. Download its release archive and unpack it under
$HOME. Link its programs into~/.local/bin, which is on thePATHof every command.
Builds that need Docker
A build has a Docker daemon only in these cases:- The runner has
builtin:sandboxhooks, andrunner.sandbox.dockeristrue. - The runner has hooks of your own that give the build one.
docker
command fails and names the socket it could not connect to.
Behind a proxy
On a host behind a proxy, the runner passes itsHTTP_PROXY, HTTPS_PROXY and
NO_PROXY variables to the image build. So Docker pulls the universal image
through the proxy. No other host variable reaches the image build.