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
| Flag | Type | Description |
|---|---|---|
-h, --help | help for container |
Options inherited from parent commands
| Flag | Type | Description |
|---|---|---|
-L, --log-level | string | Log verbosity level (debug, info, fatal) (default "info") |
--sync | Sync the executable cache first, pulling git-sourced workspaces from their remotes |
See also
- mochi — Run and organize your development tasks
- mochi container get — Show a container profile
- mochi container list — List container profiles
- mochi container remove — Delete a container profile
- mochi container runtimes — Show which container runtimes are installed and running
- mochi container set — Create or replace a container profile