> For the complete documentation index, see [llms.txt](https://asus-isg-aidc.gitbook.io/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://asus-isg-aidc.gitbook.io/guide/v1.4.0/cli/commandreference/container.md).

# Container Management

| Developer | Last modified |
| --------- | ------------- |
| AIDC Team | 2026/02/28    |

## Table of Contents

* [1. Overview](#overview)
* [2. Subcommands](#subcommands)
* [3. Usage Examples](#usage-examples)
* [4. Verifying Installation](#verifying-installation)
* [5. Related Commands](#related-commands)

***

## 1. Overview <a href="#overview" id="overview"></a>

The `container` command deploys and configures container runtimes and registries on target nodes, supporting Docker, Podman, and Harbor.

```bash
aidc-cli container <subcommand> [flags]
```

***

## 2. Subcommands <a href="#subcommands" id="subcommands"></a>

### 2.1 `docker` — Deploy Docker

Installs and configures Docker Engine on target nodes.

```bash
aidc-cli container docker -l <inventory-hostname> [-m <image>] [-n <count>]
```

| Flag              | Short | Required | Description                                         |
| ----------------- | :---: | :------: | --------------------------------------------------- |
| `--limit-hosts`   |  `-l` |     ❌    | Limit operation to specific nodes (comma-separated) |
| `--image`         |  `-m` |     ❌    | Docker image to pre-pull                            |
| `--container_num` |  `-n` |     ❌    | Number of containers to start                       |

***

### 2.2 `podman` — Deploy Podman

Installs and configures Podman on target nodes.

```bash
aidc-cli container podman -l <inventory-hostname> [-m <image>] [-n <count>]
```

| Flag              | Short | Required | Description                                         |
| ----------------- | :---: | :------: | --------------------------------------------------- |
| `--limit-hosts`   |  `-l` |     ❌    | Limit operation to specific nodes (comma-separated) |
| `--image`         |  `-m` |     ❌    | Container image to pre-pull                         |
| `--container_num` |  `-n` |     ❌    | Number of containers to start                       |

***

### 2.3 `harbor` — Deploy Harbor Registry

Deploys Harbor container registry on target nodes.

```bash
aidc-cli container harbor -l <inventory-hostname>
```

| Flag            | Short | Required | Description                                         |
| --------------- | :---: | :------: | --------------------------------------------------- |
| `--limit-hosts` |  `-l` |     ❌    | Limit operation to specific nodes (comma-separated) |

{% hint style="info" %}
Harbor has no additional flags beyond the common `--limit-hosts`. Use `init harbor-set` to configure the Harbor admin password before deployment.
{% endhint %}

***

## 3. Usage Examples <a href="#usage-examples" id="usage-examples"></a>

```bash
# Configure container settings
aidc-cli init container-set

# Deploy Docker on a specific node
aidc-cli container docker -l 865235000209-1

# Deploy Docker with pre-pulled image and 2 containers
aidc-cli container docker -l 865235000209-1 -m alpine:latest -n 2

# Deploy Podman on a specific node
aidc-cli container podman -l 865235000209-1

# Deploy Podman with image and containers
aidc-cli container podman -l 865235000209-1 -m alpine:latest -n 2

# Deploy Harbor registry
aidc-cli container harbor -l 865235000209-1
```

***

## 4. Verifying Installation <a href="#verifying-installation" id="verifying-installation"></a>

```bash
# Verify Docker
docker --version
docker ps

# Verify Podman
podman --version
podman ps
```

***

## 5. Related Commands <a href="#related-commands" id="related-commands"></a>

| Command                  | Purpose                                  |
| ------------------------ | ---------------------------------------- |
| `init container-get/set` | View/set container runtime configuration |
| `init harbor-get/set`    | View/set Harbor registry admin password  |
