Install
Usage
captures defaults to @external:
every program Mirage does not have itself. Name @python to run
Python in the container too.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Run captured programs in a Docker container.
pnpm add ssh2
captures defaults to @external:
every program Mirage does not have itself. Name @python to run
Python in the container too.
import { MountMode, RAMVFS, Workspace } from '@struktoai/mirage-node'
const ws = new Workspace(
{ '/data': new RAMVFS() },
{
mode: MountMode.EXEC,
machines: { box: { provider: 'docker', container: 'my-sandbox', mountType: 'ssh', captures: ['@python', '@external'] } },
},
)
await ws.shell("python3 -c 'print(1 + 1)'")