【问题标题】:Docker arguments for MesosMesos 的 Docker 参数
【发布时间】:2017-11-14 23:24:13
【问题描述】:

我正在尝试在 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 集群,但没有运行任何附加服务,例如 Marathon。

【问题讨论】:

    标签: docker containers mesos mesosphere


    【解决方案1】:

    来自mesos-execute

    该值可以是 JSON 格式的 TaskInfo 字符串或包含 JSON 格式的 TaskInfo 的文件路径。路径的格式必须为 file:///path/to/file/path/to/file

    查看mesos.proto 中的TaskInfo 消息以了解预期格式。注意: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;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多