2015-04-29 22:53:35 +00:00
|
|
|
// +build windows
|
|
|
|
|
|
|
|
package daemon
|
|
|
|
|
|
|
|
import (
|
Remove static errors from errors package.
Moving all strings to the errors package wasn't a good idea after all.
Our custom implementation of Go errors predates everything that's nice
and good about working with errors in Go. Take as an example what we
have to do to get an error message:
```go
func GetErrorMessage(err error) string {
switch err.(type) {
case errcode.Error:
e, _ := err.(errcode.Error)
return e.Message
case errcode.ErrorCode:
ec, _ := err.(errcode.ErrorCode)
return ec.Message()
default:
return err.Error()
}
}
```
This goes against every good practice for Go development. The language already provides a simple, intuitive and standard way to get error messages, that is calling the `Error()` method from an error. Reinventing the error interface is a mistake.
Our custom implementation also makes very hard to reason about errors, another nice thing about Go. I found several (>10) error declarations that we don't use anywhere. This is a clear sign about how little we know about the errors we return. I also found several error usages where the number of arguments was different than the parameters declared in the error, another clear example of how difficult is to reason about errors.
Moreover, our custom implementation didn't really make easier for people to return custom HTTP status code depending on the errors. Again, it's hard to reason about when to set custom codes and how. Take an example what we have to do to extract the message and status code from an error before returning a response from the API:
```go
switch err.(type) {
case errcode.ErrorCode:
daError, _ := err.(errcode.ErrorCode)
statusCode = daError.Descriptor().HTTPStatusCode
errMsg = daError.Message()
case errcode.Error:
// For reference, if you're looking for a particular error
// then you can do something like :
// import ( derr "github.com/docker/docker/errors" )
// if daError.ErrorCode() == derr.ErrorCodeNoSuchContainer { ... }
daError, _ := err.(errcode.Error)
statusCode = daError.ErrorCode().Descriptor().HTTPStatusCode
errMsg = daError.Message
default:
// This part of will be removed once we've
// converted everything over to use the errcode package
// FIXME: this is brittle and should not be necessary.
// If we need to differentiate between different possible error types,
// we should create appropriate error types with clearly defined meaning
errStr := strings.ToLower(err.Error())
for keyword, status := range map[string]int{
"not found": http.StatusNotFound,
"no such": http.StatusNotFound,
"bad parameter": http.StatusBadRequest,
"conflict": http.StatusConflict,
"impossible": http.StatusNotAcceptable,
"wrong login/password": http.StatusUnauthorized,
"hasn't been activated": http.StatusForbidden,
} {
if strings.Contains(errStr, keyword) {
statusCode = status
break
}
}
}
```
You can notice two things in that code:
1. We have to explain how errors work, because our implementation goes against how easy to use Go errors are.
2. At no moment we arrived to remove that `switch` statement that was the original reason to use our custom implementation.
This change removes all our status errors from the errors package and puts them back in their specific contexts.
IT puts the messages back with their contexts. That way, we know right away when errors used and how to generate their messages.
It uses custom interfaces to reason about errors. Errors that need to response with a custom status code MUST implementent this simple interface:
```go
type errorWithStatus interface {
HTTPErrorStatusCode() int
}
```
This interface is very straightforward to implement. It also preserves Go errors real behavior, getting the message is as simple as using the `Error()` method.
I included helper functions to generate errors that use custom status code in `errors/errors.go`.
By doing this, we remove the hard dependency we have eeverywhere to our custom errors package. Yes, you can use it as a helper to generate error, but it's still very easy to generate errors without it.
Please, read this fantastic blog post about errors in Go: http://dave.cheney.net/2014/12/24/inspecting-errors
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-25 15:53:35 +00:00
|
|
|
"fmt"
|
2015-04-29 22:53:35 +00:00
|
|
|
"strings"
|
|
|
|
|
2016-03-10 04:33:21 +00:00
|
|
|
networktypes "github.com/docker/engine-api/types/network"
|
|
|
|
|
2015-11-12 19:55:17 +00:00
|
|
|
"github.com/docker/docker/container"
|
2015-04-29 22:53:35 +00:00
|
|
|
"github.com/docker/docker/daemon/execdriver"
|
2015-12-18 18:36:17 +00:00
|
|
|
"github.com/docker/docker/daemon/execdriver/windows"
|
2015-11-18 22:20:54 +00:00
|
|
|
"github.com/docker/docker/layer"
|
2015-12-03 19:10:27 +00:00
|
|
|
"github.com/docker/libnetwork"
|
2015-04-29 22:53:35 +00:00
|
|
|
)
|
|
|
|
|
2015-11-12 19:55:17 +00:00
|
|
|
func (daemon *Daemon) setupLinkedContainers(container *container.Container) ([]string, error) {
|
2015-04-29 22:53:35 +00:00
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
|
2016-03-10 04:33:21 +00:00
|
|
|
// ConnectToNetwork connects a container to a network
|
2016-01-08 00:18:34 +00:00
|
|
|
func (daemon *Daemon) ConnectToNetwork(container *container.Container, idOrName string, endpointConfig *networktypes.EndpointSettings) error {
|
2016-03-10 04:33:21 +00:00
|
|
|
return fmt.Errorf("Windows does not support connecting a running container to a network")
|
2015-09-25 10:19:17 +00:00
|
|
|
}
|
|
|
|
|
2016-03-10 04:33:21 +00:00
|
|
|
// DisconnectFromNetwork disconnects container from a network.
|
2016-01-13 04:56:36 +00:00
|
|
|
func (daemon *Daemon) DisconnectFromNetwork(container *container.Container, n libnetwork.Network, force bool) error {
|
2016-03-10 04:33:21 +00:00
|
|
|
return fmt.Errorf("Windows does not support disconnecting a running container from a network")
|
2015-12-03 19:10:27 +00:00
|
|
|
}
|
|
|
|
|
2015-11-12 19:55:17 +00:00
|
|
|
func (daemon *Daemon) populateCommand(c *container.Container, env []string) error {
|
2015-04-29 22:53:35 +00:00
|
|
|
en := &execdriver.Network{
|
|
|
|
Interface: nil,
|
|
|
|
}
|
|
|
|
|
2016-03-10 04:33:21 +00:00
|
|
|
var epList []string
|
|
|
|
|
|
|
|
// Connect all the libnetwork allocated networks to the container
|
|
|
|
if c.NetworkSettings != nil {
|
|
|
|
for n := range c.NetworkSettings.Networks {
|
|
|
|
sn, err := daemon.FindNetwork(n)
|
|
|
|
if err != nil {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
|
|
|
ep, err := c.GetEndpointInNetwork(sn)
|
|
|
|
if err != nil {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
|
|
|
data, err := ep.DriverInfo()
|
|
|
|
if err != nil {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
if data["hnsid"] != nil {
|
|
|
|
epList = append(epList, data["hnsid"].(string))
|
2015-04-29 22:53:35 +00:00
|
|
|
}
|
|
|
|
}
|
2016-03-10 04:33:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if daemon.netController == nil {
|
|
|
|
parts := strings.SplitN(string(c.HostConfig.NetworkMode), ":", 2)
|
|
|
|
switch parts[0] {
|
|
|
|
case "none":
|
|
|
|
case "default", "": // empty string to support existing containers
|
|
|
|
if !c.Config.NetworkDisabled {
|
|
|
|
en.Interface = &execdriver.NetworkInterface{
|
|
|
|
MacAddress: c.Config.MacAddress,
|
|
|
|
Bridge: daemon.configStore.bridgeConfig.Iface,
|
|
|
|
PortBindings: c.HostConfig.PortBindings,
|
|
|
|
|
|
|
|
// TODO Windows. Include IPAddress. There already is a
|
|
|
|
// property IPAddress on execDrive.CommonNetworkInterface,
|
|
|
|
// but there is no CLI option in docker to pass through
|
|
|
|
// an IPAddress on docker run.
|
|
|
|
}
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
return fmt.Errorf("invalid network mode: %s", c.HostConfig.NetworkMode)
|
|
|
|
}
|
2015-04-29 22:53:35 +00:00
|
|
|
}
|
|
|
|
|
2015-09-22 23:05:00 +00:00
|
|
|
// TODO Windows. More resource controls to be implemented later.
|
|
|
|
resources := &execdriver.Resources{
|
2015-10-05 17:11:10 +00:00
|
|
|
CommonResources: execdriver.CommonResources{
|
2015-11-12 19:55:17 +00:00
|
|
|
CPUShares: c.HostConfig.CPUShares,
|
2015-10-05 17:11:10 +00:00
|
|
|
},
|
2015-09-22 23:05:00 +00:00
|
|
|
}
|
2015-04-29 22:53:35 +00:00
|
|
|
|
|
|
|
processConfig := execdriver.ProcessConfig{
|
2015-11-01 15:53:15 +00:00
|
|
|
CommonProcessConfig: execdriver.CommonProcessConfig{
|
|
|
|
Entrypoint: c.Path,
|
|
|
|
Arguments: c.Args,
|
|
|
|
Tty: c.Config.Tty,
|
|
|
|
},
|
2015-11-12 19:55:17 +00:00
|
|
|
ConsoleSize: c.HostConfig.ConsoleSize,
|
2015-04-29 22:53:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
processConfig.Env = env
|
|
|
|
|
2015-06-11 18:29:29 +00:00
|
|
|
var layerPaths []string
|
2015-11-18 22:20:54 +00:00
|
|
|
img, err := daemon.imageStore.Get(c.ImageID)
|
2015-07-25 00:49:43 +00:00
|
|
|
if err != nil {
|
Remove static errors from errors package.
Moving all strings to the errors package wasn't a good idea after all.
Our custom implementation of Go errors predates everything that's nice
and good about working with errors in Go. Take as an example what we
have to do to get an error message:
```go
func GetErrorMessage(err error) string {
switch err.(type) {
case errcode.Error:
e, _ := err.(errcode.Error)
return e.Message
case errcode.ErrorCode:
ec, _ := err.(errcode.ErrorCode)
return ec.Message()
default:
return err.Error()
}
}
```
This goes against every good practice for Go development. The language already provides a simple, intuitive and standard way to get error messages, that is calling the `Error()` method from an error. Reinventing the error interface is a mistake.
Our custom implementation also makes very hard to reason about errors, another nice thing about Go. I found several (>10) error declarations that we don't use anywhere. This is a clear sign about how little we know about the errors we return. I also found several error usages where the number of arguments was different than the parameters declared in the error, another clear example of how difficult is to reason about errors.
Moreover, our custom implementation didn't really make easier for people to return custom HTTP status code depending on the errors. Again, it's hard to reason about when to set custom codes and how. Take an example what we have to do to extract the message and status code from an error before returning a response from the API:
```go
switch err.(type) {
case errcode.ErrorCode:
daError, _ := err.(errcode.ErrorCode)
statusCode = daError.Descriptor().HTTPStatusCode
errMsg = daError.Message()
case errcode.Error:
// For reference, if you're looking for a particular error
// then you can do something like :
// import ( derr "github.com/docker/docker/errors" )
// if daError.ErrorCode() == derr.ErrorCodeNoSuchContainer { ... }
daError, _ := err.(errcode.Error)
statusCode = daError.ErrorCode().Descriptor().HTTPStatusCode
errMsg = daError.Message
default:
// This part of will be removed once we've
// converted everything over to use the errcode package
// FIXME: this is brittle and should not be necessary.
// If we need to differentiate between different possible error types,
// we should create appropriate error types with clearly defined meaning
errStr := strings.ToLower(err.Error())
for keyword, status := range map[string]int{
"not found": http.StatusNotFound,
"no such": http.StatusNotFound,
"bad parameter": http.StatusBadRequest,
"conflict": http.StatusConflict,
"impossible": http.StatusNotAcceptable,
"wrong login/password": http.StatusUnauthorized,
"hasn't been activated": http.StatusForbidden,
} {
if strings.Contains(errStr, keyword) {
statusCode = status
break
}
}
}
```
You can notice two things in that code:
1. We have to explain how errors work, because our implementation goes against how easy to use Go errors are.
2. At no moment we arrived to remove that `switch` statement that was the original reason to use our custom implementation.
This change removes all our status errors from the errors package and puts them back in their specific contexts.
IT puts the messages back with their contexts. That way, we know right away when errors used and how to generate their messages.
It uses custom interfaces to reason about errors. Errors that need to response with a custom status code MUST implementent this simple interface:
```go
type errorWithStatus interface {
HTTPErrorStatusCode() int
}
```
This interface is very straightforward to implement. It also preserves Go errors real behavior, getting the message is as simple as using the `Error()` method.
I included helper functions to generate errors that use custom status code in `errors/errors.go`.
By doing this, we remove the hard dependency we have eeverywhere to our custom errors package. Yes, you can use it as a helper to generate error, but it's still very easy to generate errors without it.
Please, read this fantastic blog post about errors in Go: http://dave.cheney.net/2014/12/24/inspecting-errors
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-25 15:53:35 +00:00
|
|
|
return fmt.Errorf("Failed to graph.Get on ImageID %s - %s", c.ImageID, err)
|
2015-07-25 00:49:43 +00:00
|
|
|
}
|
2015-11-18 22:20:54 +00:00
|
|
|
|
|
|
|
if img.RootFS != nil && img.RootFS.Type == "layers+base" {
|
|
|
|
max := len(img.RootFS.DiffIDs)
|
|
|
|
for i := 0; i <= max; i++ {
|
|
|
|
img.RootFS.DiffIDs = img.RootFS.DiffIDs[:i]
|
|
|
|
path, err := layer.GetLayerPath(daemon.layerStore, img.RootFS.ChainID())
|
|
|
|
if err != nil {
|
Remove static errors from errors package.
Moving all strings to the errors package wasn't a good idea after all.
Our custom implementation of Go errors predates everything that's nice
and good about working with errors in Go. Take as an example what we
have to do to get an error message:
```go
func GetErrorMessage(err error) string {
switch err.(type) {
case errcode.Error:
e, _ := err.(errcode.Error)
return e.Message
case errcode.ErrorCode:
ec, _ := err.(errcode.ErrorCode)
return ec.Message()
default:
return err.Error()
}
}
```
This goes against every good practice for Go development. The language already provides a simple, intuitive and standard way to get error messages, that is calling the `Error()` method from an error. Reinventing the error interface is a mistake.
Our custom implementation also makes very hard to reason about errors, another nice thing about Go. I found several (>10) error declarations that we don't use anywhere. This is a clear sign about how little we know about the errors we return. I also found several error usages where the number of arguments was different than the parameters declared in the error, another clear example of how difficult is to reason about errors.
Moreover, our custom implementation didn't really make easier for people to return custom HTTP status code depending on the errors. Again, it's hard to reason about when to set custom codes and how. Take an example what we have to do to extract the message and status code from an error before returning a response from the API:
```go
switch err.(type) {
case errcode.ErrorCode:
daError, _ := err.(errcode.ErrorCode)
statusCode = daError.Descriptor().HTTPStatusCode
errMsg = daError.Message()
case errcode.Error:
// For reference, if you're looking for a particular error
// then you can do something like :
// import ( derr "github.com/docker/docker/errors" )
// if daError.ErrorCode() == derr.ErrorCodeNoSuchContainer { ... }
daError, _ := err.(errcode.Error)
statusCode = daError.ErrorCode().Descriptor().HTTPStatusCode
errMsg = daError.Message
default:
// This part of will be removed once we've
// converted everything over to use the errcode package
// FIXME: this is brittle and should not be necessary.
// If we need to differentiate between different possible error types,
// we should create appropriate error types with clearly defined meaning
errStr := strings.ToLower(err.Error())
for keyword, status := range map[string]int{
"not found": http.StatusNotFound,
"no such": http.StatusNotFound,
"bad parameter": http.StatusBadRequest,
"conflict": http.StatusConflict,
"impossible": http.StatusNotAcceptable,
"wrong login/password": http.StatusUnauthorized,
"hasn't been activated": http.StatusForbidden,
} {
if strings.Contains(errStr, keyword) {
statusCode = status
break
}
}
}
```
You can notice two things in that code:
1. We have to explain how errors work, because our implementation goes against how easy to use Go errors are.
2. At no moment we arrived to remove that `switch` statement that was the original reason to use our custom implementation.
This change removes all our status errors from the errors package and puts them back in their specific contexts.
IT puts the messages back with their contexts. That way, we know right away when errors used and how to generate their messages.
It uses custom interfaces to reason about errors. Errors that need to response with a custom status code MUST implementent this simple interface:
```go
type errorWithStatus interface {
HTTPErrorStatusCode() int
}
```
This interface is very straightforward to implement. It also preserves Go errors real behavior, getting the message is as simple as using the `Error()` method.
I included helper functions to generate errors that use custom status code in `errors/errors.go`.
By doing this, we remove the hard dependency we have eeverywhere to our custom errors package. Yes, you can use it as a helper to generate error, but it's still very easy to generate errors without it.
Please, read this fantastic blog post about errors in Go: http://dave.cheney.net/2014/12/24/inspecting-errors
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-25 15:53:35 +00:00
|
|
|
return fmt.Errorf("Failed to get layer path from graphdriver %s for ImageID %s - %s", daemon.layerStore, img.RootFS.ChainID(), err)
|
2015-11-18 22:20:54 +00:00
|
|
|
}
|
|
|
|
// Reverse order, expecting parent most first
|
|
|
|
layerPaths = append([]string{path}, layerPaths...)
|
2015-06-11 18:29:29 +00:00
|
|
|
}
|
|
|
|
}
|
2015-11-18 22:20:54 +00:00
|
|
|
|
2015-12-16 22:13:50 +00:00
|
|
|
m, err := c.RWLayer.Metadata()
|
2015-07-25 00:49:43 +00:00
|
|
|
if err != nil {
|
Remove static errors from errors package.
Moving all strings to the errors package wasn't a good idea after all.
Our custom implementation of Go errors predates everything that's nice
and good about working with errors in Go. Take as an example what we
have to do to get an error message:
```go
func GetErrorMessage(err error) string {
switch err.(type) {
case errcode.Error:
e, _ := err.(errcode.Error)
return e.Message
case errcode.ErrorCode:
ec, _ := err.(errcode.ErrorCode)
return ec.Message()
default:
return err.Error()
}
}
```
This goes against every good practice for Go development. The language already provides a simple, intuitive and standard way to get error messages, that is calling the `Error()` method from an error. Reinventing the error interface is a mistake.
Our custom implementation also makes very hard to reason about errors, another nice thing about Go. I found several (>10) error declarations that we don't use anywhere. This is a clear sign about how little we know about the errors we return. I also found several error usages where the number of arguments was different than the parameters declared in the error, another clear example of how difficult is to reason about errors.
Moreover, our custom implementation didn't really make easier for people to return custom HTTP status code depending on the errors. Again, it's hard to reason about when to set custom codes and how. Take an example what we have to do to extract the message and status code from an error before returning a response from the API:
```go
switch err.(type) {
case errcode.ErrorCode:
daError, _ := err.(errcode.ErrorCode)
statusCode = daError.Descriptor().HTTPStatusCode
errMsg = daError.Message()
case errcode.Error:
// For reference, if you're looking for a particular error
// then you can do something like :
// import ( derr "github.com/docker/docker/errors" )
// if daError.ErrorCode() == derr.ErrorCodeNoSuchContainer { ... }
daError, _ := err.(errcode.Error)
statusCode = daError.ErrorCode().Descriptor().HTTPStatusCode
errMsg = daError.Message
default:
// This part of will be removed once we've
// converted everything over to use the errcode package
// FIXME: this is brittle and should not be necessary.
// If we need to differentiate between different possible error types,
// we should create appropriate error types with clearly defined meaning
errStr := strings.ToLower(err.Error())
for keyword, status := range map[string]int{
"not found": http.StatusNotFound,
"no such": http.StatusNotFound,
"bad parameter": http.StatusBadRequest,
"conflict": http.StatusConflict,
"impossible": http.StatusNotAcceptable,
"wrong login/password": http.StatusUnauthorized,
"hasn't been activated": http.StatusForbidden,
} {
if strings.Contains(errStr, keyword) {
statusCode = status
break
}
}
}
```
You can notice two things in that code:
1. We have to explain how errors work, because our implementation goes against how easy to use Go errors are.
2. At no moment we arrived to remove that `switch` statement that was the original reason to use our custom implementation.
This change removes all our status errors from the errors package and puts them back in their specific contexts.
IT puts the messages back with their contexts. That way, we know right away when errors used and how to generate their messages.
It uses custom interfaces to reason about errors. Errors that need to response with a custom status code MUST implementent this simple interface:
```go
type errorWithStatus interface {
HTTPErrorStatusCode() int
}
```
This interface is very straightforward to implement. It also preserves Go errors real behavior, getting the message is as simple as using the `Error()` method.
I included helper functions to generate errors that use custom status code in `errors/errors.go`.
By doing this, we remove the hard dependency we have eeverywhere to our custom errors package. Yes, you can use it as a helper to generate error, but it's still very easy to generate errors without it.
Please, read this fantastic blog post about errors in Go: http://dave.cheney.net/2014/12/24/inspecting-errors
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-02-25 15:53:35 +00:00
|
|
|
return fmt.Errorf("Failed to get layer metadata - %s", err)
|
2015-07-25 00:49:43 +00:00
|
|
|
}
|
|
|
|
layerFolder := m["dir"]
|
2015-06-11 18:29:29 +00:00
|
|
|
|
2015-12-18 18:36:17 +00:00
|
|
|
var hvPartition bool
|
|
|
|
// Work out the isolation (whether it is a hypervisor partition)
|
|
|
|
if c.HostConfig.Isolation.IsDefault() {
|
|
|
|
// Not specified by caller. Take daemon default
|
|
|
|
hvPartition = windows.DefaultIsolation.IsHyperV()
|
|
|
|
} else {
|
|
|
|
// Take value specified by caller
|
|
|
|
hvPartition = c.HostConfig.Isolation.IsHyperV()
|
|
|
|
}
|
|
|
|
|
2015-11-12 19:55:17 +00:00
|
|
|
c.Command = &execdriver.Command{
|
2015-10-05 21:27:39 +00:00
|
|
|
CommonCommand: execdriver.CommonCommand{
|
|
|
|
ID: c.ID,
|
2015-11-12 19:55:17 +00:00
|
|
|
Rootfs: c.BaseFS,
|
2015-10-05 21:27:39 +00:00
|
|
|
WorkingDir: c.Config.WorkingDir,
|
|
|
|
Network: en,
|
2015-11-12 19:55:17 +00:00
|
|
|
MountLabel: c.GetMountLabel(),
|
2015-10-05 21:27:39 +00:00
|
|
|
Resources: resources,
|
|
|
|
ProcessConfig: processConfig,
|
2015-11-12 19:55:17 +00:00
|
|
|
ProcessLabel: c.GetProcessLabel(),
|
2015-10-05 21:27:39 +00:00
|
|
|
},
|
|
|
|
FirstStart: !c.HasBeenStartedBefore,
|
|
|
|
LayerFolder: layerFolder,
|
|
|
|
LayerPaths: layerPaths,
|
|
|
|
Hostname: c.Config.Hostname,
|
2015-12-18 18:36:17 +00:00
|
|
|
Isolation: string(c.HostConfig.Isolation),
|
2015-11-09 19:49:16 +00:00
|
|
|
ArgsEscaped: c.Config.ArgsEscaped,
|
2015-12-18 18:36:17 +00:00
|
|
|
HvPartition: hvPartition,
|
2016-03-10 04:33:21 +00:00
|
|
|
EpList: epList,
|
2015-04-29 22:53:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-11-03 01:06:09 +00:00
|
|
|
// getSize returns real size & virtual size
|
2015-11-12 19:55:17 +00:00
|
|
|
func (daemon *Daemon) getSize(container *container.Container) (int64, int64) {
|
2015-04-29 22:53:35 +00:00
|
|
|
// TODO Windows
|
|
|
|
return 0, 0
|
|
|
|
}
|
|
|
|
|
2015-09-11 19:05:57 +00:00
|
|
|
// setNetworkNamespaceKey is a no-op on Windows.
|
2015-11-03 19:25:22 +00:00
|
|
|
func (daemon *Daemon) setNetworkNamespaceKey(containerID string, pid int) error {
|
2015-09-11 19:05:57 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-11-12 19:55:17 +00:00
|
|
|
func (daemon *Daemon) setupIpcDirs(container *container.Container) error {
|
2015-08-03 22:05:34 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-11-12 19:55:17 +00:00
|
|
|
// TODO Windows: Fix Post-TP4. This is a hack to allow docker cp to work
|
|
|
|
// against containers which have volumes. You will still be able to cp
|
|
|
|
// to somewhere on the container drive, but not to any mounted volumes
|
|
|
|
// inside the container. Without this fix, docker cp is broken to any
|
|
|
|
// container which has a volume, regardless of where the file is inside the
|
|
|
|
// container.
|
|
|
|
func (daemon *Daemon) mountVolumes(container *container.Container) error {
|
2015-08-03 22:05:34 +00:00
|
|
|
return nil
|
|
|
|
}
|
2015-09-24 21:59:23 +00:00
|
|
|
|
2015-11-12 19:55:17 +00:00
|
|
|
func detachMounted(path string) error {
|
2015-12-01 18:39:34 +00:00
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2015-11-12 19:55:17 +00:00
|
|
|
func killProcessDirectly(container *container.Container) error {
|
2015-11-11 21:53:38 +00:00
|
|
|
return nil
|
|
|
|
}
|
2016-03-10 04:33:21 +00:00
|
|
|
|
|
|
|
func isLinkable(child *container.Container) bool {
|
|
|
|
return false
|
|
|
|
}
|