cliExtension
cliExtension(
manager,opts?):Extension
Defined in: packages/runtime/src/container/cli-extension.ts:344
Container CLI Extension for the root container.
Parameters
Section titled “Parameters”manager
Section titled “manager”The ContainerManager instance (created at boot time).
Optional configuration; see CliExtensionOpts.
Returns
Section titled “Returns”An Extension suitable for Unix().use(...) on the root container.
Remarks
Section titled “Remarks”What this registers:
- Bins:
container— single dispatcher that routesrun,stop,drain,restart,rm,ps,kill,wait,exec,attach,logs,inspect,nsenter,unshare,help.help— standalone/lib/help/reader. - Mounts:
/dev/container— a containerFS instance bound tomanager,opts.resolver,opts.selfInfo, andopts.auditLoggers. - Files:
/lib/help/container,/lib/help/container-run,/lib/help/container-stop,/lib/help/container-drain,/lib/help/container-restart,/lib/help/container-rm,/lib/help/container-ps,/lib/help/container-kill,/lib/help/container-wait,/lib/help/container-exec,/lib/help/container-attach,/lib/help/container-logs,/lib/help/container-inspect,/lib/help/container-unshare,/lib/help/container-nsenter— one-liner help stubs per subcommand.
All container operations go through container <cmd> to avoid shadowing
coreutils names (rm, ps, kill, wait). This Extension is intended
for the root container only; children do not inherit these bins —
capability in child namespaces is defined by presence, not inheritance.
Example
Section titled “Example”import { Unix } from '@fishnet/core'import { cliExtension } from '@fishnet/runtime/container/cli-extension'
const sys = await Unix() .use(cliExtension(manager, { resolver, image })) .build() .boot()await sys.run('container run alpine --name web')