Home  >  Q&A  >  body text

ubuntu - docker镜像如何裁剪?

首先我执行了 docker pull ubuntu 下载官方的镜像
之后安装了 lnmp (http://lnmp.org/)
等安装完毕之后进行docker commit 操作保存镜像
结果发现镜像太大了~~ 如何裁剪??

伊谢尔伦伊谢尔伦2709 days ago859

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-04-22 09:01:09

    Don’t understand what you mean by cropping.
    You can compile and install nginx, mysql and php by yourself, these three will not take up much space.
    Secondly, the docker image is self-increasing. Ubuntu is 180M. If you base it on it, you will only add the new part on this basis.
    If you really feel that the image is too large, I suggest you check the system software to see if unnecessary software is installed or files that should not be stored are stored.

    reply
    0
  • 黄舟

    黄舟2017-04-22 09:01:09

    Use Dockerfile to automatically build, instead of manually submitting images, and it is also convenient for team sharing

    reply
    0
  • Cancelreply