How to see docker image contents

前端 未结 9 1180
说谎
说谎 2020-11-30 16:18

I did a docker pull and can list the image that\'s downloaded. I want to see the contents of this image. Did a search on the net but no straight answer.

9条回答
  •  無奈伤痛
    2020-11-30 16:50

    You should not start a container just to see the image contents. For instance, you might want to look for malicious content, not run it. Use "create" instead of "run";

    docker create --name="tmp_$$" image:tag
    docker export tmp_$$ | tar t
    docker rm tmp_$$
    

提交回复
热议问题