禁用特定RUN命令的缓存 [英] Disable cache for specific RUN commands

查看:106
本文介绍了禁用特定RUN命令的缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Docker文件中有几个 RUN 命令,我想用 -no-cache 时间我建立一个Docker的图像。



我明白 docker build -no-cache 将禁用整个缓存Dockerfile。



是否可以为特定的RUN命令禁用缓存?

解决方案

p>截至2016年2月是不可能的。



该功能已在 GitHub


I have a few RUN commands in my Dockerfile that I would like to run with -no-cache each time I build a Docker image.

I understand the docker build -no-cache will disable caching for the entire Dockerfile.

Is it possible to disable cache for a specific RUN command?

解决方案

As of February 2016 it is not possible.

The feature has been requested at GitHub

这篇关于禁用特定RUN命令的缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆