docker - Allow to cache commands in Docker
问题描述
I am new to Docker, and tried to search, but couldnt find this topic... So, my question is the following. i.e. in Dockerfile is:
...
RUN apt-get -y install apache2 autoconf build-essential apache2-dev .... bunch of modules list here
...
RUN OTHER_COMMANDS
...
So, there is an issue after OTHER_COMMANDS
, and I have to re-run the build process. However, it always takes 20 minutes to install apache2
and etc... Is there any way,to tell docker to skip that command (to use the previously build results) for that command? it it will not re-download/re-install apache2 and tons of modules over and over again from ground.
解决方案
推荐阅读
- java - 为什么 Char 变量在没有声明 char 数组的情况下存储堆栈的过去值?看代码?
- automated-tests - 如何运行 Silk-Test(4Test 语言)3 次并每次都从列表中获取数据?(每次都是不同的人)
- javascript - 将主干迁移到 Angular 6
- c - 不理解语句的行
- angular - 如何获取对象的类型定义名称?
- mongoose - 密码中有@时如何使用猫鼬连接到MongoDB?
- assembly - 使用 msdn api 在程序集中打印 hello world
- keras - 用于训练文本分类数据的 LSTM 模型权重
- struts2 - xml中的struts 2重定向(type =“redirect-Action”,type =“redirect”)重定向到http而不是https
- python - 检查整数列表中的所有元素是否为 0 的最节省时间/空间的方法