容器.Mesos的docker参数

pprl5pva  于 2021-06-26  发布在  Mesos
关注(0)|答案(1)|浏览(399)

我正在尝试在mesos集群中执行docker容器。我要执行的有效docker命令是:

docker run -it -v /home/me:/home/jovyan/work -p 8888:8888 jupyter/pyspark-notebook

我知道命令的形式是:

mesos-execute --containerizer=docker --master=127.0.0.1:9090 --name=test --docker_image=jupyter/pyspark-notebook --command="start-notebook.sh" --resources="cpus:8"

我如何传递等价于 -p 以及 -v 关于 memos-execute 命令?
目前,我正在运行一个香草mesos集群,没有任何像marathonrunning这样的附加服务。

a64a0gku

a64a0gku1#

从mesos执行
该值可以是json格式的字符串 TaskInfo 或者包含json格式的 TaskInfo . 路径的格式必须为 file:///path/to/file 或者 /path/to/file .
看到了吗 TaskInfo 中的消息 mesos.proto 对于预期格式。注: agent_id 不需要设置。
taskinfo包含名为 ContainerInfo 您可以在其中配置 port mappings .
对于您可以使用的任何其他自定义选项 Parameters ```
// Allowing arbitrary parameters to be passed to docker CLI.
// Note that anything passed to this field is not guaranteed
// to be supported moving forward, as we might move away from
// the docker CLI.
repeated Parameter parameters = 5;

相关问题