---
url: https://docs.mochiexec.io/reference/cli/mochi_container.md
description: Manage container profiles to run executables in
---

# 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](mochi.md) — Run and organize your development tasks
* [mochi container get](mochi_container_get.md) — Show a container profile
* [mochi container list](mochi_container_list.md) — List container profiles
* [mochi container remove](mochi_container_remove.md) — Delete a container profile
* [mochi container runtimes](mochi_container_runtimes.md) — Show which container runtimes are installed and running
* [mochi container set](mochi_container_set.md) — Create or replace a container profile
