errors.go 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package runconfig
  2. import (
  3. "fmt"
  4. )
  5. var (
  6. // ErrConflictContainerNetworkAndLinks conflict between --net=container and links
  7. ErrConflictContainerNetworkAndLinks = fmt.Errorf("conflicting options: container type network can't be used with links. This would result in undefined behavior")
  8. // ErrConflictSharedNetwork conflict between private and other networks
  9. ErrConflictSharedNetwork = fmt.Errorf("container sharing network namespace with another container or host cannot be connected to any other network")
  10. // ErrConflictHostNetwork conflict from being disconnected from host network or connected to host network.
  11. ErrConflictHostNetwork = fmt.Errorf("container cannot be disconnected from host network or connected to host network")
  12. // ErrConflictNoNetwork conflict between private and other networks
  13. ErrConflictNoNetwork = fmt.Errorf("container cannot be connected to multiple networks with one of the networks in private (none) mode")
  14. // ErrConflictNetworkAndDNS conflict between --dns and the network mode
  15. ErrConflictNetworkAndDNS = fmt.Errorf("conflicting options: dns and the network mode")
  16. // ErrConflictNetworkHostname conflict between the hostname and the network mode
  17. ErrConflictNetworkHostname = fmt.Errorf("conflicting options: hostname and the network mode")
  18. // ErrConflictHostNetworkAndLinks conflict between --net=host and links
  19. ErrConflictHostNetworkAndLinks = fmt.Errorf("conflicting options: host type networking can't be used with links. This would result in undefined behavior")
  20. // ErrConflictContainerNetworkAndMac conflict between the mac address and the network mode
  21. ErrConflictContainerNetworkAndMac = fmt.Errorf("conflicting options: mac-address and the network mode")
  22. // ErrConflictNetworkHosts conflict between add-host and the network mode
  23. ErrConflictNetworkHosts = fmt.Errorf("conflicting options: custom host-to-IP mapping and the network mode")
  24. // ErrConflictNetworkPublishPorts conflict between the publish options and the network mode
  25. ErrConflictNetworkPublishPorts = fmt.Errorf("conflicting options: port publishing and the container type network mode")
  26. // ErrConflictNetworkExposePorts conflict between the expose option and the network mode
  27. ErrConflictNetworkExposePorts = fmt.Errorf("conflicting options: port exposing and the container type network mode")
  28. // ErrUnsupportedNetworkAndIP conflict between network mode and requested ip address
  29. ErrUnsupportedNetworkAndIP = fmt.Errorf("user specified IP address is supported on user defined networks only")
  30. // ErrUnsupportedNetworkNoSubnetAndIP conflict between network with no configured subnet and requested ip address
  31. ErrUnsupportedNetworkNoSubnetAndIP = fmt.Errorf("user specified IP address is supported only when connecting to networks with user configured subnets")
  32. // ErrUnsupportedNetworkAndAlias conflict between network mode and alias
  33. ErrUnsupportedNetworkAndAlias = fmt.Errorf("network-scoped alias is supported only for containers in user defined networks")
  34. // ErrConflictUTSHostname conflict between the hostname and the UTS mode
  35. ErrConflictUTSHostname = fmt.Errorf("conflicting options: hostname and the UTS mode")
  36. )