docker run 和 docker container run 有什么区别 [英] What is the difference between docker run and docker container run

查看:165
本文介绍了docker run 和 docker container run 有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮助我理解 docker run & 之间的区别吗?docker 容器运行?

can anyone help me in the understanding difference between docker run & docker container run?

当我做docker run --help &docker container run --help 从 docker cmd 行.我看到以下

when i do docker run --help & docker container run --help from docker cmd line. I see the following

在新容器中运行命令.

它们在内部运行容器的方式有什么不同,或者两者都做同样的工作吗?

Is there any difference in how they run the container internally or both are same doing same work?

根据 https://forums.docker.com/t/docker-run-and-docker-container-run/30526.docker run 仍然是旧的,很快就会被弃用,但尚未确认.

As per https://forums.docker.com/t/docker-run-and-docker-container-run/30526. docker run is still the old one, which will be deprecated soon but same is not confirmed.

推荐答案

它们完全一样.

在 docker 1.13 之前,docker run 命令仅可用.然后将 CLI 命令重构为具有 docker COMMAND SUBCOMMAND 的形式,在这种情况下,COMMAND 是 container,而 SUBCOMMAND 是 run.这样做是为了让命令分组更直观,因为当时命令的数量已经大幅增加.

Prior to docker 1.13 the docker run command was only available. The CLI commands were then refactored to have the form docker COMMAND SUBCOMMAND, wherein this case the COMMAND is container and the SUBCOMMAND is run. This was done to have a more intuitive grouping of commands since the number of commands at the time has grown substantially.

您可以在CLI 重构.

这篇关于docker run 和 docker container run 有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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