Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The reason for the Docker Hub image typically consisting of just one layer in the output of the Docker history command is because Docker Hub uses a technique called "image squashing" to optimize the size of Docker images. This technique involves combining multiple layers into a single layer during the image build process, resulting in a smaller final image with fewer layers. When the image is pushed to Docker Hub, only the final squashed layer is stored, which is why the Docker history command shows just one layer.