Home Interests Docker

How to Show All Layers of a Docker Image

howchoo   (467)
August 9, 2023
5 minutes


Posted in these interests:
docker • 4 guides

Docker images are made up of layers, and many times you’ll want to see details on each layer of an image. This guide will show you how to show all layers of a Docker image.

1 – Use the docker history command

As an example, we’ll check out the layers of the python:3.6 image. So first run:

docker pull python:3.6

And use docker history to show the layers.

docker history python:3.6

2 – Analyze the output

The output of this command will show you details about how each layer was created and the size:

IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
a5b7afcfdcc8        2 months ago        /bin/sh -c #(nop)  CMD ["python3"]              0B
<missing>           2 months ago        /bin/sh -c set -ex;   wget -O get-pip.py 'ht…   6MB
<missing>           2 months ago        /bin/sh -c #(nop)  ENV PYTHON_PIP_VERSION=10…   0B
<missing>           2 months ago        /bin/sh -c cd /usr/local/bin  && ln -s idle3…   32B
<missing>           2 months ago        /bin/sh -c set -ex  && buildDeps='   dpkg-de…   67.3MB
<missing>           2 months ago        /bin/sh -c #(nop)  ENV PYTHON_VERSION=3.6.5     0B
<missing>           2 months ago        /bin/sh -c #(nop)  ENV GPG_KEY=0D96DF4D4110E…   0B
<missing>           2 months ago        /bin/sh -c apt-get update && apt-get install…   8.73MB
<missing>           2 months ago        /bin/sh -c #(nop)  ENV LANG=C.UTF-8             0B
<missing>           2 months ago        /bin/sh -c #(nop)  ENV PATH=/usr/local/bin:/…   0B
<missing>           2 months ago        /bin/sh -c set -ex;  apt-get update;  apt-ge…   556MB
<missing>           2 months ago        /bin/sh -c apt-get update && apt-get install…   142MB
<missing>           2 months ago        /bin/sh -c set -ex;  if ! command -v gpg > /…   7.8MB
<missing>           2 months ago        /bin/sh -c apt-get update && apt-get install…   23.2MB
<missing>           3 months ago        /bin/sh -c #(nop)  CMD ["bash"]                 0B
<missing>           3 months ago        /bin/sh -c #(nop) ADD file:9572fdb59dfbb9b03…   101MB


How to Run a Raspberry Pi Cluster with Docker Swarm

An in-depth Raspberry Pi cluster example.
howchoo   (467)
September 20, 2023

A cluster is a group of computers performing the same task, operating as a single system. Although Raspberry Pi’s are pretty incredible devices, a single Pi can only do so much. A Raspberry Pi cluster can be used anytime you want to improve performance or availability, and there are many use cases including serving web

Continue Reading


 467 guides

Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo's writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.

Discover interesting things!

Explore Howchoo's most popular interests.