Skip to content

mochi container set ​

Create or replace a container profile

Synopsis ​

Saves a container profile, replacing any with the same name. Every field is set from the flags given; a field left out takes Flow's default.

shell
mochi container set <name> --image <image> [flags]

Examples ​

shell
mochi container set go --image golang:1.26 --volume ~/.cache/go-build:/root/.cache/go-build
mochi container set node --image node:22-alpine --runtime podman --network host

Options ​

FlagTypeDescription
--descriptionstringWhat the profile is for
--entrypointstringEntrypoint (default sh); pass "" to use the image's own
-h, --helphelp for set
--imagestringImage to run in, e.g. golang:1.26-alpine
--inherit-envPass the run's resolved environment into the container (default true)
--mount-workspacestringWhere the workspace root is mounted (default /workspace)
--networkstringNetwork to attach to, e.g. host or none
-o, --outputstringOutput format: text or json (default "text")
--runtimestringRuntime: auto (detect the one installed and running), docker or podman (default "auto")
--userstringUser to run as: uid, uid:gid or name (Linux default: your user)
--volumestringArrayExtra bind mount, host:container[:options]; repeatable
--workdirstringWorking directory in the container (default: the executable's dir under the workspace mount)

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 ​