docker build 失败退出,如何恢复并接着之前的步骤继续 build
迷茫
迷茫 2017-04-24 09:09:43
0
2
1103

build 的时候有跑系统更新,所以更新了很多文件,结果安装程序的时候写错了一个字母导致命令中断并退出。

重新修改 Dockerfile 后,如何能接着之前退出的部分继续 build 呢?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
刘奇

Docker's build operation is based on cache by default, that is, after you modify the Dockerfile, the build task will quickly skipyour previous successful steps, and all operations after the step you modified will be re-run.
If you want each build not to be based on the previous cache, add the --no-cache=true parameter to the build command
Also see:
Dockerfile best practices

巴扎黑

Normally speaking, there is no need to re-run the previous steps when rebuilding. Just 从失败的那条RUN开头的命令开始接着处理;

It is recommended that you split multiple commands into independent RUN commands; ensure that you do not need to re-run the previous RUN command each time;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!