Containers
Lifecycle, logs, stats, terminal, and backup/restore commands for Docker containers.
The container command group covers the full lifecycle plus streaming attachments and backup/restore. All commands accept --host to target a specific host; otherwise the sticky host from dockerman host use is used.
List and inspect
dockerman container list
dockerman container list --pretty
dockerman container inspect weblist returns the same shape the GUI uses: id, name, image, state, port mappings, created time. Add --pretty for a column-aligned table.
Lifecycle
dockerman container start web
dockerman container stop web --timeout 10
dockerman container restart web --timeout 10
dockerman container pause web
dockerman container unpause web
dockerman container rename web web-oldstop and restart accept --timeout in seconds; the daemon sends SIGTERM, then SIGKILL after the timeout.
Create and clone
dockerman container create web nginx:latest --platform linux/amd64
dockerman container create web nginx:latest --config '{"HostConfig":{"AutoRemove":true}}'
dockerman container commit web --repo myrepo --tag snapshot --pause--config accepts the JSON object itself. It does not read a file path. commit snapshots a running container into a new image.
Remove
dockerman container remove web --force --volumes --yesremove is destructive. It requires --yes (or the global -y flag); without it the daemon rejects the call. Add --force to remove a running container, --volumes to delete anonymous volumes.
Logs
dockerman container logs web --tail 50
dockerman container logs web --follow --tail 5
dockerman container logs web --since 2026-05-01T00:00:00Z --timestamps
dockerman container logs web --follow --jsonWithout --json, plain stdout is log lines only; errors go to stderr. With --json, the CLI emits one streaming envelope per frame. --follow runs until you press Ctrl+C (exit 130) or the stream ends naturally (exit 0).
--until is incompatible with --follow; the CLI rejects the combination before opening a stream. Use --since/--until for historical fetches and --follow/--since for tailing.
Stats
dockerman container stats web
dockerman container stats web --prettystats always streams. Each frame is one NDJSON line containing CPU, memory, network, and block I/O counters. Press Ctrl+C to stop (exit 130).
Terminal
dockerman container terminal web
dockerman container terminal web --shell /bin/bash --user rootAllocates a PTY through docker exec and attaches your terminal. The CLI refuses to run when stdin/stdout is not a TTY; pipe-based scripting should use dockerman call exec_* instead.
Backup and restore
Backup snapshots a container's filesystem (and optional bind mounts) into a single archive. Restore creates a new container from that archive.
Inspect what would be archived
dockerman container backup-targets web --prettyLists the container's volumes and bind mounts. The response does not include a safe_to_archive field.
Create the archive
dockerman container backup web \
--output ./web.tar.gz \
--pause \
--include-all-safe-bind-mountsUse --include-bind-mount <index> to opt in per mount and --no-pause to skip the pause/unpause cycle. --force only allows overwriting an existing output archive; it does not bypass a bind-mount safety decision.
Preview an archive
dockerman container backup-preview ./web.tar.gz --prettyShows the manifest without restoring.
Restore
dockerman container restore ./web.tar.gz \
--name web-restored \
--volume-strategy rename \
--port 8080:80 \
--yesRestore is destructive (it creates a new container that may collide with names/volumes), so --yes is required. --volume-strategy is one of rename, skip, overwrite.
Backup paths are resolved on the CLI side to absolute local paths before being sent to the daemon. The daemon itself requires an absolute path but does not enforce the additional workspace and symlink policy previously documented here. Review every included bind mount before archiving it.