Skip to content

Display short container ID #1584

@JamesNK

Description

@JamesNK

The full docker container ID is long. 64 characters. Ain't nobody got time for that.

Docker command line tools and UI tooling such as Docker for Windows display the short container ID. The short container ID is the first 12 characters of the ID, and realistically will always be enough to uniquely identify a container.

See https://www.baeldung.com/ops/docker-container-id-from-name

Examples:

$ docker container ls -a
CONTAINER ID   IMAGE          COMMAND                  CREATED          STATUS          PORTS     NAMES
80f1bc1e7feb   nginx:alpine   "/docker-entrypoint.…"   36 seconds ago   Up 36 seconds   80/tcp    web-server-11
acdea168264a   nginx:alpine   "/docker-entrypoint.…"   36 seconds ago   Up 36 seconds   80/tcp    web-server-10
0cbfc6c17009   nginx:alpine   "/docker-entrypoint.…"   37 seconds ago   Up 36 seconds   80/tcp    web-server-1

image

The Aspire dashboard should display the short ID. The copy button should copy the full 64-character value.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions