docker: how to show the diffs between 2 images

后端 未结 8 916
走了就别回头了
走了就别回头了 2021-01-30 10:33

I have a Dockerfile with a sequence of RUN instructions that execute \"apt-get install\"s; for example, a couple of lines:

RUN apt-get install -y tree
RUN apt-ge         


        
8条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-30 10:41

    It is now 2019 and I just found a useful tool which was released in late 2017. https://opensource.googleblog.com/2017/11/container-diff-for-comparing-container-images.html

    The following content is from container-diff github page:

    container-diff diff   --type=history  [History]
    container-diff diff   --type=file  [File System]
    container-diff diff   --type=size  [Size]
    container-diff diff   --type=rpm  [RPM]
    container-diff diff   --type=pip  [Pip]
    container-diff diff   --type=apt  [Apt]
    container-diff diff   --type=node  [Node]
    

    You can similarly run many analyzers at once:

    container-diff diff   --type=history --type=apt --type=node
    

提交回复
热议问题