Skip to content

mochi container ​

Manage container profiles to run executables in

Synopsis ​

A container profile is a named container spec: an image, the runtime to run it with (docker or podman), and how the workspace is mounted. Run an executable inside one with --container, without changing its flow file:

mochi build app --container go

Every step that runs a command runs in the profile: an exec executable, and each exec step of a serial or parallel one. Request, render and launch steps run on the host. A profile takes the fields of a flow file's exec.container block, runs through Flow's own container support, and replaces any container block a step declares itself. Profiles are kept on this machine; which engine runs them is set with 'mochi config set container-runtime'.

The image needs sh (the default entrypoint) and every tool the task calls: your PATH isn't visible inside. Only the run's parameters, arguments, secrets and FLOW_* variables are passed in, never your shell's environment.

Options ​

FlagTypeDescription
-h, --helphelp for container

Options inherited from parent commands ​

FlagTypeDescription
-L, --log-levelstringLog verbosity level (debug, info, fatal) (default "info")
--syncSync the executable cache first, pulling git-sourced workspaces from their remotes

See also ​