Use the CLI application containerctl to monitor and manage your containers.
The CLI supports both:
-
Interactive mode, for manual use (with Tab autocomplete support)
-
Command-line mode, useful for scripts
Syntax
# containerctl --help
usage: containerctl [-h] [-v] [--socket SOCKET] [--cmd CMD] [--params PARAMS] [--timeout TIMEOUT]
cc-containerd Unix socket CLI
options:
-h, --help show this help message and exit
-v, --version Show ctl version and compare it with daemon version
--socket SOCKET Unix socket path
--cmd CMD API command for one-shot mode
--params PARAMS JSON object with params for one-shot mode
--timeout TIMEOUT Socket timeout in seconds (default: 30, install uses 900)
Interactive shell
Run the CLI without arguments to enter the interactive shell.
Type help at the CLI prompt to get a list of supported commands:
# containerctl
[ccmng]# help
Available commands:
capabilities
config
events
exit
install
list
logs
metrics
register
restart
start
status
stop
uninstall
unregister
version
|
Press Tab to auto-complete command parameters and file paths. |
You can type exit at any time to quit the shell.
Let’s explore some common CLI operations:
Install a DCP
|
Before you can install a DCP container, you need to create one. See Step 2 - Create a container for your device for an example on creating a DCP out of a public Docker image. |
The install command registers, installs, and optionally starts your container (if the DCP manifest has autostart set to yes).
To install a container, type the install command passing the path to your DCP file.
[ccmng]# install artifact_path=<path-to-your-container>
- id: <your-container>
status: Running
Get the status of a container
To obtain the status of a container type the status command and pass your container id:
[ccmng]# status id <container-id> detail full
- id: <containter-id>
friendly_name: <Your container name>
created: 2026-05-29T07:25:44.686Z
started: 2026-05-29T07:25:45.516Z
updated: 2026-05-29T07:26:37.697Z
stopped: 2026-05-29T07:25:44.686Z
restart:
enabled: yes
count: 0
reason: -
runtime: podman
create_args: --privileged --network host --tty
status: Running
Get metrics for a running container
The metrics command returns the CPU and memory usage, network stats, and other useful information about your container:
[ccmng]# metrics id <container-id>
- id: <container-id>
CPU: 1.55% (2.0 cores)
Memory: 8.9 MiB / 757.8 MiB
Network: rx 111.8 MiB, tx 1.0 MiB
I/O: read 0 B, write 0 B
Uptime: 5m 58s
Stop a running container
To stop a running container:
[ccmng]# stop id <container-id>
- id: <container-id>
status: Stopped
Uninstall a DCP
Command uninstall done over a DCP container, uninstalls, deletes, and unregisters the container:
[ccmng]# uninstall id <container-id>
- id: <container-id>
status: Deleted
How to work with LXC and OCI-type containers
Digi Container Packages (DCP) are tarballs containing an LXC or OCI-type (Podman/Docker) container, plus a metadata file with instructions for the Container Manager daemon.
You can use the CLI to manage regular LXC or OCI-type (Podman/Docker) containers, but you then need to supply instructions for the daemon as parameters of your commands.
Besides, you need to do a register operation before you can install a container, and an unregister operation after you uninstall a container.
Install an LXC or OCI-type container
If you have a tarball with an LXC or OCI-type container, you first need to register the container. You need to pass:
-
id: a unique identifier -
runtime: must belxcfor LXC containers, orpodmanfor Podman/Docker containers -
create_args: (for Podman/Docker only) create arguments for podman runtime
Optionally, you can pass additional parameters such as friendly_name, monitor, autostart…
See Digi Container Package (DCP) for the complete list of arguments.
For example:
[ccmng]# register id <container-id> runtime podman create_args "--privileged --network host --tty" monitor yes autostart yes
- id: <container-id>
config_changed: yes
Now you can install the container:
[ccmng]# install id <container-id>
- id: <your-container>
status: Running
Uninstall an LXC or OCI-type container
Stop the container if it’s running:
[ccmng]# stop id <container-id>
- id: <your-container>
status: Stopped
Command uninstall, uninstalls and deletes the container, but keeps the registration details (parameters for the Container Manager), in case you want to re-install it in the future:
[ccmng]# uninstall id <container-id>
- id: <your-container>
status: Registered
Optionally unregister it (this removes parameters for the Container Manager):
[ccmng]# unregister id <container-id>
- id: <your-container>
status: Deleted