Forward SandboxConfig.Hostname to Workload container activation

1. For Windows the Hostname property is not inherited from the sandbox and must
be passed for the Workload container activations as well.

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
This commit is contained in:
Justin Terry (VM) 2019-09-24 10:21:17 -07:00
parent 4f203aa8ba
commit ed7873ef1e

View File

@ -63,6 +63,7 @@ func (c *criService) containerSpec(id string, sandboxID string, sandboxPid uint3
// NOTE: readonly rootfs doesn't work on windows.
customopts.WithoutRoot,
customopts.WithWindowsNetworkNamespace(netNSPath),
oci.WithHostname(sandboxConfig.GetHostname()),
)
specOpts = append(specOpts, customopts.WithWindowsMounts(c.os, config, extraMounts))