如何在马拉松比赛中使用音量

ham*_*mmi 10 marathon docker mesos mesosphere

我正在使用mesos + marathon + docker很长一段时间但我在某个时候陷入了困境.目前我尝试处理持久性容器,我尝试使用"volume-from"参数,但我无法使其工作,因为我不知道如何弄清楚要放入的数据框的名称它作为json的关键.我用这里的例子试了一下

    {
    "id": "privileged-job",
    "container": {
        "docker": {
            "image": "mesosphere/inky"
            "privileged": true,
            "parameters": [
                { "key": "hostname", "value": "a.corp.org" },
                { "key": "volumes-from", "value": "another-container" },
                { "key": "lxc-conf", "value": "..." }
            ]
        },
        "type": "DOCKER",
        "volumes": []
    },
    "args": ["hello"],
    "cpus": 0.2,
    "mem": 32.0,
    "instances": 1
}
Run Code Online (Sandbox Code Playgroud)

我真的很感激任何一种帮助:-)

aho*_*olt 0

{
    "id": "data-container",
    "container": {
        "docker": {
            "image": "mesosphere/inky"
        },
        "type": "DOCKER",
        "volumes": [
      {
        "containerPath": "/data",
        "hostPath": "/var/data/a",
        "mode": "RW"
      }
    ]
    },
    "args": ["data-only"],
    "cpus": 0.2,
    "mem": 32.0,
    "instances": 1
}
{
    "id": "privileged-job",
    "container": {
        "docker": {
            "image": "mesosphere/inky"
            "privileged": true,
            "parameters": [
                { "key": "hostname", "value": "a.corp.org" },
                { "key": "volumes-from", "value": "data-container" },
                { "key": "lxc-conf", "value": "..." }
            ]
        },
        "type": "DOCKER",
        "volumes": []
    },
    "args": ["hello"],
    "cpus": 0.2,
    "mem": 32.0,
    "instances": 1
}
Run Code Online (Sandbox Code Playgroud)

也许是这样的?