在 console 中用 docker history
即可檢視 docker image layers:
docker history php:8.1 IMAGE CREATED CREATED BY SIZE COMMENT 7b5ec6cb3ed5 5 days ago /bin/sh -c #(nop) CMD ["php" "-a"] 0B <missing> 5 days ago /bin/sh -c #(nop) ENTRYPOINT ["docker-php-e… 0B <missing> 5 days ago /bin/sh -c docker-php-ext-enable sodium 17B <missing> 5 days ago /bin/sh -c #(nop) COPY multi:6edd033b037aa2d… 7.2kB <missing> 5 days ago /bin/sh -c set -eux; savedAptMark="$(apt-m… 121MB <missing> 5 days ago /bin/sh -c #(nop) COPY file:ce57c04b70896f77… 587B .....
發現一個工具 dive
可以是更詳細的資料: