LCOW: owner and network endpoints
@@ -296,6 +296,7 @@ func (clnt *client) createLinux(containerID string, checkpoint string, checkpoin
Name: containerID,
SystemType: "container",
ContainerType: "linux",
+ Owner: defaultOwner,
TerminateOnLastHandleClosed: true,
HvRuntime: &hcsshim.HvRuntime{
ImagePath: `c:\program files\lcow`,
@@ -328,6 +329,18 @@ func (clnt *client) createLinux(containerID string, checkpoint string, checkpoin
})
}
+ for _, option := range options {
+ if n, ok := option.(*NetworkEndpointsOption); ok {
+ configuration.EndpointList = n.Endpoints
+ configuration.AllowUnqualifiedDNSQuery = n.AllowUnqualifiedDNSQuery
+ if n.DNSSearchList != nil {
+ configuration.DNSSearchList = strings.Join(n.DNSSearchList, ",")
+ }
+ configuration.NetworkSharedContainerName = n.NetworkSharedContainerID
+ break
+ }
+ }
+
hcsContainer, err := hcsshim.CreateContainer(containerID, configuration)
if err != nil {
return err
