errors.go 3.3 KB

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