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

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

问题描述

任何人都可以帮助我理解 docker run 与& docker container run

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

当我执行 docker run --help &从docker cmd行 docker container run --help 。我看到以下

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

在新容器中运行命令

根据 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正在运行。这样做是为了使命令更加更具创意,因为当时的命令数量已大大增加。

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, where in this case the COMMAND is container and the SUBCOMMAND is run. This was done to have a more inituitive grouping of commands since the number of commands at the time has grown substantially.

您可以在 CLI进行了重组

简而言之,请使用 docker container run ,因为它是运行容器的更现代的方式。

In short, use docker container run as it is the more modern way to run a container.

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

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