Canonical: https://weaveos.com/reference/docker/inspect-container-configuration

1. [Software capabilities](https://weaveos.com/reference)
2. /[Docker](https://weaveos.com/reference/docker)
3. /Inspect Docker container configuration

Docker capability

# Inspect Docker container configuration

Inspect a container to see its configured image, environment, mounts, and network settings. Use the CLI for a quick lookup and the Engine API or Docker SDK when a program needs the fields.

Documentation reviewed November 26, 2026

## Ways to do it

CLI

### docker container inspect \<container>

Print the container’s details as JSON. Pass --format to select the field you need.

- Requirements

  Docker CLI connected to the daemon containing the container name or ID.

- Limitations

  Size fields require --size. The default metadata describes the container configuration and state.

Example

```
docker container inspect --format '{{.Config.Image}}' "$CONTAINER"
```

[Read source: Docker CLI container inspect ↗](https://docs.docker.com/reference/cli/docker/container/inspect/)

API

### GET /containers/{id}/json

Read the engine’s container metadata as a JSON response.

- Requirements

  Authorized access to the Docker daemon and the container name or ID.

- Limitations

  Use size=true if you need SizeRw and SizeRootFs in the response.

[Read source: Docker Engine API ContainerInspect ↗](https://docs.docker.com/reference/api/engine/version/v1.52/#tag/Container/operation/ContainerInspect)

SDK

### client.containers.get() and Container.attrs

Get a container object by ID or name in Python and read its inspected fields from attrs.

- Requirements

  An authorized Docker SDK client and the container name or ID.

- Limitations

  The SDK caches attrs on the object. Call reload() before reading fields that might have changed.

[Read source: Docker SDK for Python container objects ↗](https://docker-py.readthedocs.io/en/stable/containers.html#docker.models.containers.Container)

## More from Docker

[View all Docker capabilities →](https://weaveos.com/reference/docker)

- [Read Docker container logs↗](https://weaveos.com/reference/docker/read-container-logs)
