Fluent, immutable builder for declarative sandbox images. Each method returns a newDocumentation Index
Fetch the complete documentation index at: https://docs.opencomputer.dev/llms.txt
Use this file to discover all available pages before exploring further.
Image instance.
Image.base()
Start from the default OpenSandbox environment (Ubuntu 22.04, Python, Node.js, build tools).
Image
Builder Methods
image.aptInstall(packages)
System packages to install via apt-get
Image
image.pipInstall(packages)
Python packages to install via pip
Image
image.runCommands(...cmds)
Shell commands to run during build
Image
image.env(vars)
Environment variables to set
Image
image.workdir(path)
Default working directory
Image
image.addFile(remotePath, content)
Destination path in the image
File content
Image
image.addLocalFile(localPath, remotePath)
Path to the local file
Destination path in the image
Image
image.addLocalDir(localPath, remotePath)
Path to the local directory
Destination path in the image
Image
Utility Methods
image.toJSON()
Returns the image manifest as a plain object.
Returns: ImageManifest
image.cacheKey()
Computes a deterministic SHA-256 hash of the manifest for cache lookups.
Returns: string