Docker参数为Mesos
我正尝试在Mesos群集中执行一个docker容器。 我想要执行的有效docker命令是:
docker run -it -v /home/me:/home/jovyan/work -p 8888:8888 jupyter/pyspark-notebook
我明白这个命令的forms是:
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
命令?
目前,我正在运行一个vanilla Mesos集群,没有任何像马拉松运行的附加服务。
从mesos执行
该值可以是JSON格式的
TaskInfo
string,也可以是包含JSON格式的TaskInfo
的文件path。 path必须是file:///path/to/file
formsfile:///path/to/file
或/path/to/file
。请参阅
mesos.proto
的TaskInfo
消息以mesos.proto
预期的格式。 注意:agent_id
不需要设置。
TaskInfo包含名为ContainerInfo
容器configuration的归档,您可以在其中configurationport 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;