ExecutionRequest.runtime) and runtime-specific command/extension behavior.
Supported runtimes
| Runtime | Base image | Default extension | Extension aliases | Inline support |
|---|---|---|---|---|
| Python | isol8:python | .py | none | Yes |
| Node | isol8:node | .mjs | .js, .cjs | Yes |
| Bun | isol8:bun | .ts | none | Yes |
| Deno | isol8:deno | .mts | none | Yes (engine writes temp file) |
| Bash | isol8:bash | .sh | none | Yes |
Registration order matters for extension detection: Bun wins
.ts; Deno uses .mts to avoid collision.How runtime selection works
- CLI
- Library
- API
Node.js module behavior (CJS and ESM)
.mjs: ESM.cjs: CommonJS.js: Node default resolution behavior- inline (
-e/code) executes throughnode -e
If module mode matters, use explicit extensions (
.mjs / .cjs) or force runtime + file extension in request construction.Runtime execution commands
| Runtime | Inline command | File command |
|---|---|---|
| Python | python3 -c <code> | python3 <file> |
| Node | node -e <code> | node <file> |
| Bun | bun -e <code> | bun run <file> |
| Deno | Engine writes file first | deno run --allow-read=/sandbox,/tmp --allow-write=/sandbox,/tmp --allow-env --allow-net <file> |
| Bash | bash -c <code> | bash <file> |
Package install behavior (installPackages / --install)
| Runtime | Runtime install command | Setup image build command |
|---|---|---|
| Python | pip install --user --no-cache-dir --break-system-packages ... | pip install --no-cache-dir ... |
| Node | npm install --prefix /sandbox ... | npm install -g ... |
| Bun | bun install -g --global-dir=... | bun install -g ... |
| Deno | deno cache ... | deno cache ... |
| Bash | apk add --no-cache ... | apk add --no-cache ... |
Runtime installs are written under
/sandbox so native extensions can execute (/tmp is noexec).Runtime-specific notes
Python
- strong ecosystem for data/scientific workloads
- packages install under
/sandbox/.local
Node
- best for JS ecosystem tooling and JSON transforms
- supports
.mjs,.cjs, and.js
Bun
- fastest TS/JS startup for many workloads
- default extension mapping for
.ts
Deno
- explicit
.mtspath avoids.tsambiguity with Bun - adapter requires file execution; inline requests are materialized as files by engine
Bash
- useful for shell orchestration and glue scripts
- package installs use Alpine
apk
FAQ
Why does .ts run on Bun, not Deno?
Why does .ts run on Bun, not Deno?
Runtime registry gives Bun ownership of
.ts. Use .mts for Deno or explicit runtime: "deno".Can I switch runtimes inside one persistent session?
Can I switch runtimes inside one persistent session?
No. Persistent containers are runtime-bound. Use separate sessions for Python/Node/Bun/Deno/Bash.
Why do some packages fail on Alpine-based images?
Why do some packages fail on Alpine-based images?
Some packages expect
glibc or extra system libs. Use custom images with required dependencies or compatible alternatives.Troubleshooting
- Runtime detection mismatch: pass explicit
--runtime(CLI) orrequest.runtime. - Module mode issues in Node: use explicit
.mjsor.cjsfile extension. - Deno inline confusion: send inline code normally; engine writes temp file for Deno execution.
- Install failures: verify network mode and package manager compatibility for selected runtime.