Docker Inspect
Docker
As soon as you get familiar with listing Docker containers and starting containers or stopping containers, you’ll probably get curious about learning a little more. Docker has a great command for obtaining low level configuration details about containers: docker inspect.
Docker Inspect features
I find the following to be most useful when using docker inspect to look at one of the running containers:
- long form container ID and timestamp when it was created
- current status (really useful even if container is stopped – will show you why)
- Docker image info
- Filesystem binds and volume info, mounts
- environment variables – this is where a lot of usernames/passwords will be found – automation comes at a cost to security
- command line parameters passed into the container
- network configuration: IP address and gateway, secondary addresses for IPv4 and IPv6
Docker Inspect output
Here’s a fragment of the docker inspect output for a MariaDB container on one of my hosts:
See Also
Docker
As soon as you get familiar with listing Docker containers and starting containers or stopping containers, you’ll probably get curious about learning a little more. Docker has a great command for obtaining low level configuration details about containers: docker inspect.
Docker Inspect features
I find the following to be most useful when using docker inspect to look at one of the running containers:
- long form container ID and timestamp when it was created
- current status (really useful even if container is stopped – will show you why)
- Docker image info
- Filesystem binds and volume info, mounts
- environment variables – this is where a lot of usernames/passwords will be found – automation comes at a cost to security
- command line parameters passed into the container
- network configuration: IP address and gateway, secondary addresses for IPv4 and IPv6
Docker Inspect output
Here’s a fragment of the docker inspect output for a MariaDB container on one of my hosts: