What's the purpose of “docker build --pull”?

后端 未结 3 957
离开以前
离开以前 2021-02-05 00:52

When building a docker image you normally use docker build ..

But i\'ve found that you can specify --pull, so the whole command would look like

3条回答
  •  被撕碎了的回忆
    2021-02-05 01:37

    Simple answer. docker build is used to build from a local dockerfile. docker pull is used to pull from docker hub. If you use docker build without a docker file it throws an error.

    When you specify --pull or :latest docker will try to download the newest version (if any)

    Basically, if you add --pull, it will try to pull the newest version each time it is run.

提交回复
热议问题