Closed Spritekin closed 7 years ago
there isn't a golang example yet. volumes are part of ContainerInfo
, you'll need Mode, HostPath, and ContainerPath. xref https://github.com/mesosphere/marathon/blob/c81becd819a15a667a4f44f867fbfffa9ff484c6/src/main/scala/mesosphere/mesos/TaskGroupBuilder.scala#L316
Good enough for me... will try and report.
I did this in my go code:
import (
"github.com/mesos/mesos-go/mesosproto"
)
type Task struct {
mesosproto.TaskInfo
... other stuff here...
}
Then using t Task
t.Container.Volumes = append(t.Container.Volumes, &mesosproto.Volume{
Mode: mesosproto.Volume_RW.Enum(),
HostPath: proto.String("/my/host/path"),
ContainerPath: proto.String("/my/container/path"),
})
... other mesos/docker initialisation stuff ...
Sent to mesos it mounted ok!
Quite a nice library you got here. Kudos.
Hi, I need to mount a folder in the host into a container. May anybody tell me how to do this with mesos-go? Is there an example? Is it possible at all?
Thanks!