运行和启动Docker容器的区别 [英] Difference between Running and Starting a Docker container

查看:171
本文介绍了运行和启动Docker容器的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在实践中开始一个容器我做:
docker运行a8asd8f9asdf0

In practice to start a container I do: docker run a8asd8f9asdf0

如果是这样的话, b $ bdocker startdo?

If thats the case, what does: "docker start" do?

在手册中,它说
启动一个或多个停止的容器

困惑。

推荐答案


  • 运行运行图像

  • 开始启动一个容器

    • run runs an image
    • start starts a container.
    • docker run doc 提到:

      The docker run doc does mention:


      docker run 命令首先在指定的映像上创建一个可写容器层,然后使用指定的命令启动它。

      The docker run command first creates a writeable container layer over the specified image, and then starts it using the specified command.

      就是说,docker运行相当于API / containers / create then / container /(id)/ start

      That is, docker run is equivalent to the API /containers/create then /containers/(id)/start.

      不要运行一个现有的容器,你将Docker exec(因为docker 1.3)

      你可以重新启动退出的容器

      这篇关于运行和启动Docker容器的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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