Docker image size not matching the container size after a commit

前端 未结 2 1981
栀梦
栀梦 2021-01-14 11:48

Recently I created a docker container from a centos base image which ran a jboss. Originally I had installed the jdk (and committed) which made the container bulky (about 85

2条回答
  •  花落未央
    2021-01-14 12:37

    I think you will find this issue easily resolvable if you are using Dockerfiles to build your images, rather than the commit method. If you are using Dockerfiles, you can simply remove the RUN command that added the JDK, and rebuild. This will get rid of the previous layers.

提交回复
热议问题