在docker文件中的FROM指令一直拖动最新版本的映像 [英] does the FROM directive in a dockerfile allways pull the latest version of an image

查看:147
本文介绍了在docker文件中的FROM指令一直拖动最新版本的映像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有一个Docker文件:

  FROM ubuntu / latest 
pre>

和ubuntu在公共注册表中更新他们的图像。当我运行 docker build。时,会使用它第一次使用的ubuntu还是将它拉出新版本?

解决方案

不,没有。一个 FROM 指令将使用本地映像缓存中可用的任何事情,除非您通过 - 将 code> docker build 。


If I have a Dockerfile:

FROM ubuntu/latest

and ubuntu update their image in the public registry. When I run docker build ., will it use the ubuntu that it got the first time or will it pull the new version?

解决方案

No, it does not. A FROM directive will use whatever happens to be available in your local image cache, unless you pass --pull to docker build.

这篇关于在docker文件中的FROM指令一直拖动最新版本的映像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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