How many layers in a container?

1.2k 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 answers

2
Tarun Lalwani On BEST ANSWER

yes.

docker history -q <imagenameorid> | wc -l

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