---
url: https://docs.mochiexec.io/reference/cli/mochi_container_set.md
description: Create or replace a container profile
---

# 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

| Flag | Type | Description |
|------|------|-------------|
| `--description` | `string` | What the profile is for |
| `--entrypoint` | `string` | Entrypoint (default sh); pass "" to use the image's own |
| `-h, --help` |  | help for set |
| `--image` | `string` | Image to run in, e.g. golang:1.26-alpine |
| `--inherit-env` |  | Pass the run's resolved environment into the container (default true) |
| `--mount-workspace` | `string` | Where the workspace root is mounted (default /workspace) |
| `--network` | `string` | Network to attach to, e.g. host or none |
| `-o, --output` | `string` | Output format: text or json (default "text") |
| `--runtime` | `string` | Runtime: auto (detect the one installed and running), docker or podman (default "auto") |
| `--user` | `string` | User to run as: uid, uid:gid or name (Linux default: your user) |
| `--volume` | `stringArray` | Extra bind mount, host:container\[:options]; repeatable |
| `--workdir` | `string` | Working directory in the container (default: the executable's dir under the workspace mount) |

## 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 container](mochi_container.md) — Manage container profiles to run executables in
