会员登录 - 用户注册 - 设为首页 - 加入收藏 - 网站地图 如何打造更小巧的容器镜像!

如何打造更小巧的容器镜像

时间:2025-11-04 00:08:55 来源:益强数据堂 作者:IT科技 阅读:385次
如何打造更小巧的容器镜像
何打复制#Dockerfilewith cacheFROM fedora:28LABEL maintainer ChrisCollins<collins.christopher@gmail.com>RUN dnf install -y nginx-----#Dockerfilew/o cacheFROM fedora:28LABEL maintainer ChrisCollins<collins.christopher@gmail.com>RUN dnf install -y nginx \&& dnf clean all \&&rm-rf /var/cache/yum-----[chris@krang] $ docker build -t cache -f Dockerfile.[chris@krang] $ docker images --format "{{.Repository}}: {{.Size}}"|head-n 1cache:464 MB[chris@krang] $ docker build -t no-cache -f Dockerfile-wo-cache .[chris@krang] $ docker images --format "{{.Repository}}: {{.Size}}"|head-n 1no-cache:271 MB1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.

(责任编辑:应用开发)

推荐内容
  • 电脑编程入门(用计算机创造无限可能的世界)
  • 简单数据库迁移实践
  • Spark中的核心概念RDD,我们了解多少?
  • MySQL技能提升篇 — sqlyog高级应用
  • 电光火石电脑安装教程(为您解析电脑组装步骤,让您成为电脑高手)
  • MongoDB的数据建模