How many layers in a container?

1.3k Views Asked by At

Is there a way to check how many layers a docker container is composed without going over each docker file that it “inherits” to count how many RUN are there?

1

There are 1 best solutions below

2
On BEST ANSWER

yes.

docker history -q <imagenameorid> | wc -l

This will give you the count of layer in the given image