简体   繁体   English

“ docker run”命令中“ sandbox”是什么意思?

[英]What is the meaning of “sandbox” in “docker run” command?

I am running the Docker image with Apache Spark : 我正在使用Apache Spark运行Docker映像

docker run -i -t -h sandbox sequenceiq/spark:1.2.1-ubuntu /etc/bootstrap.sh -bash

I can know the meaning of " -i ", " -t " and " -h " after executing " docker run --help " command. 执行“ docker run --help ”命令后,我可以知道“ -i ”,“- -t ”和“ -h ”的含义。 But how can I explain the " sandbox " here? 但是我如何在这里解释“ sandbox ”? Is it a option of " docker run " command? 它是“ docker run ”命令的选项吗? I can't find it in the output of " docker run --help ". 我在“ docker run --help ”的输出中找不到它。

In that command, sandbox is the argument for -h option. 在该命令中, sandbox-h选项的参数。 So sandbox will be the hostname of the container you are creating. 因此,沙箱将是您正在创建的容器的主机名。 It has not any special meaning and could be any hostname you wish. 它没有任何特殊含义,可以是您希望的任何主机名。

The process launched by docker run has no access to the other processes on your host, this is more or less a sandbox. docker run启动的进程无法访问主机上的其他进程,这或多或少是一个沙箱。 When you launch a docker container (say a webserver such as nginx), and you go inside with a docker exec you can do a ps -ef and you only see the processes of nginx and your docker exec not all the processes of your host 当您启动Docker容器(例如nginx之类的网络服务器),并且使用docker exec进入内部时,您可以执行ps -ef并且您只会看到nginx和docker exec的进程,而不是主机的所有进程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM