mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
Use a host volume to mount alloc and task dirs
host volumes are the preferred way to share data.
This commit is contained in:
committed by
Abhishek Chanda
parent
8a9f5c26c8
commit
848404a48d
@@ -163,7 +163,7 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, e
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("Failed to find task local directory: %v", task.Name)
|
||||
}
|
||||
cmdArgs = append(cmdArgs, fmt.Sprintf("--volume %s,kind=empty,readOnly=false,source=%s --mount volume=data,target=%s", task.Name, local, ctx.AllocDir.SharedDir))
|
||||
cmdArgs = append(cmdArgs, fmt.Sprintf("--volume %s,kind=host,readOnly=false,source=%s --mount volume=%s,target=%s", task.Name, local, task.Name, ctx.AllocDir.SharedDir))
|
||||
|
||||
// Check if the user has overriden the exec command.
|
||||
if execCmd, ok := task.Config["command"]; ok {
|
||||
|
||||
Reference in New Issue
Block a user