summaryrefslogtreecommitdiff
path: root/daemon/container_windows.go
diff options
context:
space:
mode:
authorDavid Calavera <david.calavera@gmail.com>2015-10-30 14:59:59 -0700
committerDavid Calavera <david.calavera@gmail.com>2015-10-30 14:59:59 -0700
commit0c991f3d68227a57225552e0c5237a72e5177da2 (patch)
treec2815cb0d8d05fb42986b4ac3c6683ff0a42a9a3 /daemon/container_windows.go
parent23a0fe9627e6056826c7c3bf55cb0c1bfdde52bc (diff)
parent9d14866d7173e974b9eff34e251b16083647f056 (diff)
downloaddocker-0c991f3d68227a57225552e0c5237a72e5177da2.tar.gz
Merge pull request #16779 from Microsoft/10662-execdrivercommand
Windows: Refactor execdriver.Command
Diffstat (limited to 'daemon/container_windows.go')
-rw-r--r--daemon/container_windows.go40
1 files changed, 16 insertions, 24 deletions
diff --git a/daemon/container_windows.go b/daemon/container_windows.go
index a5617b9c3a..b71b4f59a4 100644
--- a/daemon/container_windows.go
+++ b/daemon/container_windows.go
@@ -80,11 +80,6 @@ func populateCommand(c *Container, env []string) error {
return derr.ErrorCodeInvalidNetworkMode.WithArgs(c.hostConfig.NetworkMode)
}
- pid := &execdriver.Pid{}
-
- // TODO Windows. This can probably be factored out.
- pid.HostPid = c.hostConfig.PidMode.IsHost()
-
// TODO Windows. More resource controls to be implemented later.
resources := &execdriver.Resources{
CommonResources: execdriver.CommonResources{
@@ -126,26 +121,23 @@ func populateCommand(c *Container, env []string) error {
}
layerFolder := m["dir"]
- // TODO Windows: Factor out remainder of unused fields.
c.command = &execdriver.Command{
- ID: c.ID,
- Rootfs: c.rootfsPath(),
- ReadonlyRootfs: c.hostConfig.ReadonlyRootfs,
- InitPath: "/.dockerinit",
- WorkingDir: c.Config.WorkingDir,
- Network: en,
- Pid: pid,
- Resources: resources,
- CapAdd: c.hostConfig.CapAdd.Slice(),
- CapDrop: c.hostConfig.CapDrop.Slice(),
- ProcessConfig: processConfig,
- ProcessLabel: c.getProcessLabel(),
- MountLabel: c.getMountLabel(),
- FirstStart: !c.HasBeenStartedBefore,
- LayerFolder: layerFolder,
- LayerPaths: layerPaths,
- Hostname: c.Config.Hostname,
- Isolated: c.hostConfig.Isolation.IsHyperV(),
+ CommonCommand: execdriver.CommonCommand{
+ ID: c.ID,
+ Rootfs: c.rootfsPath(),
+ InitPath: "/.dockerinit",
+ WorkingDir: c.Config.WorkingDir,
+ Network: en,
+ MountLabel: c.getMountLabel(),
+ Resources: resources,
+ ProcessConfig: processConfig,
+ ProcessLabel: c.getProcessLabel(),
+ },
+ FirstStart: !c.HasBeenStartedBefore,
+ LayerFolder: layerFolder,
+ LayerPaths: layerPaths,
+ Hostname: c.Config.Hostname,
+ Isolated: c.hostConfig.Isolation.IsHyperV(),
}
return nil