> ## Documentation Index
> Fetch the complete documentation index at: https://commander-docs.cyshel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Containers

> Docker container management per workspace.

## Overview

Commander can manage Docker containers within each workspace, letting you run services, databases, or development tools alongside your agents.

<Note>
  For devcontainer-based development environments (Local Docker or GitHub Codespaces), see
  [Environments](/features/environments). This page covers manually managed containers added to
  individual workspaces.
</Note>

## Adding a Container

Add containers to a workspace through the workspace detail view or via the manager:

1. Specify a Docker **image** (e.g., `postgres:16`, `redis:7`)
2. Configure **port mappings** to expose container ports to your host
3. Set **environment variables** for configuration
4. Mount **volumes** to persist data or share files with the worktree
5. Optionally configure a **health check** command

## Container Lifecycle

| Status    | Description                          |
| --------- | ------------------------------------ |
| Created   | Container registered but not started |
| Pulling   | Docker image being downloaded        |
| Starting  | Container launching                  |
| Running   | Container active and healthy         |
| Unhealthy | Health check failing                 |
| Stopping  | Container shutting down              |
| Stopped   | Container exited                     |
| Errored   | Container failed to start or crashed |

## Pull Progress

When pulling a new Docker image, Commander shows real-time download progress so you know when the container will be ready.

## Viewing Logs

Access container logs from the workspace detail view. Logs update in real time for running containers.

## Health Checks

Configure health checks to monitor container readiness:

* **Command** — The health check command to run inside the container
* **Interval** — How often to run the check
* **Timeout** — How long to wait for the check to pass
* **Retries** — How many consecutive failures before marking unhealthy

## Container Actions

| Action      | Description                              |
| ----------- | ---------------------------------------- |
| **Start**   | Launch a stopped container               |
| **Stop**    | Gracefully shut down a running container |
| **Restart** | Stop and restart a container             |
| **Remove**  | Delete the container entirely            |

Containers are automatically cleaned up when you delete a workspace.
