docker sandbox ls

Description List sandboxes
Usage docker sandbox ls
Aliases
docker sandbox list

docker sandbox ls

描述

列出所有可用的沙盒。

使用

docker sandbox ls [OPTIONS]

选项

名称 简写 类型 默认值 描述
--format -f string 使用自定义输出格式打印输出:
--format '{{.Name}}'
--no-trunc bool false 不截断输出
--quiet -q bool false 仅显示沙盒 ID

示例

使用自定义格式列出所有沙盒

$ docker sandbox ls --format '{{.Name}}'

列出所有沙盒的 ID

$ docker sandbox ls -q

列出所有沙盒(不截断输出)

$ docker sandbox ls --no-trunc

Description

List all sandboxes.

This command lists all sandboxes using the Docker API.

Options

Option Default Description
--no-trunc Don't truncate output
-q, --quiet Only display sandbox IDs

Examples

List all sandboxes

$ docker sandbox ls
SANDBOX ID    NAME         WORKSPACE                    CREATED
abc123def     my-project   /home/user/my-project        2 hours ago
def456ghi     ml-work      /home/user/ml-projects       1 day ago

Show only sandbox IDs (--quiet)

--quiet

Output only sandbox IDs:

$ docker sandbox ls --quiet
abc123def
def456ghi

Don't truncate output (--no-trunc)

--no-trunc

By default, long sandbox IDs and workspace paths are truncated for readability. Use --no-trunc to display the full values:

$ docker sandbox ls
SANDBOX ID    TEMPLATE  NAME         WORKSPACE                     STATUS   CREATED
abc123def456  ubuntu    my-project   /home/user/.../my-project     running  2 hours ago

$ docker sandbox ls --no-trunc
SANDBOX ID              TEMPLATE  NAME         WORKSPACE                                          STATUS   CREATED
abc123def456ghi789jkl   ubuntu    my-project   /home/user/very/long/path/to/my-project           running  2 hours ago