For system, network and cloud administrators

How to view the size of your Docker containers

I came across situations where I needed tot test which Docker image would be most suitable for a particular set of needs and one of those metrics that I used was disk space. I remember the more I used to get started with Docker, the more I was curious to see which Docker images consume more or less resources.


How to view the IP of a Docker container

In order to view the IP of a Docker container, you can execute the following command:

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container-ID-or-name

How to run Docker in debug mode and view container logs?

  1. Execute the Docker events command:
docker events &
Docker events command

By this point, any Docker command that you’ll run next will be viewed with more logs.


How to remove “none” Docker images

In the process of building a Docker image, you might find yourself in the situation where a “none” image is dangling in your Docker registry, as seen below:

Listing Docker images

In order to remove the “none” Docker images, you can use:

docker rmi -f $(docker images --filter "dangling=true" -q --no-trunc)

What is a “shell”?

The Bourne Shell: /bin/sh

The shell is one of the most important parts of a Unix system and that’s why developers and admins around the world rely so much on it. It’s basically a program inside which the user can run commands and create shell scripts. Unix programmers used the shell as a programming environment too. In fact, a lot of the important parts of the Unix system itself are … shell scripts.


Follow BusyNetwork