runconfig/errors.go
4f0d95fa
 package runconfig // import "github.com/docker/docker/runconfig"
2b7ad47b
 
ebcb7d6b
 const (
2b7ad47b
 	// ErrConflictContainerNetworkAndLinks conflict between --net=container and links
ebcb7d6b
 	ErrConflictContainerNetworkAndLinks validationError = "conflicting options: container type network can't be used with links. This would result in undefined behavior"
2b7ad47b
 	// ErrConflictSharedNetwork conflict between private and other networks
ebcb7d6b
 	ErrConflictSharedNetwork validationError = "container sharing network namespace with another container or host cannot be connected to any other network"
2b7ad47b
 	// ErrConflictHostNetwork conflict from being disconnected from host network or connected to host network.
ebcb7d6b
 	ErrConflictHostNetwork validationError = "container cannot be disconnected from host network or connected to host network"
2b7ad47b
 	// ErrConflictNoNetwork conflict between private and other networks
ebcb7d6b
 	ErrConflictNoNetwork validationError = "container cannot be connected to multiple networks with one of the networks in private (none) mode"
2b7ad47b
 	// ErrConflictNetworkAndDNS conflict between --dns and the network mode
ebcb7d6b
 	ErrConflictNetworkAndDNS validationError = "conflicting options: dns and the network mode"
2b7ad47b
 	// ErrConflictNetworkHostname conflict between the hostname and the network mode
ebcb7d6b
 	ErrConflictNetworkHostname validationError = "conflicting options: hostname and the network mode"
2b7ad47b
 	// ErrConflictHostNetworkAndLinks conflict between --net=host and links
ebcb7d6b
 	ErrConflictHostNetworkAndLinks validationError = "conflicting options: host type networking can't be used with links. This would result in undefined behavior"
2b7ad47b
 	// ErrConflictContainerNetworkAndMac conflict between the mac address and the network mode
ebcb7d6b
 	ErrConflictContainerNetworkAndMac validationError = "conflicting options: mac-address and the network mode"
2b7ad47b
 	// ErrConflictNetworkHosts conflict between add-host and the network mode
ebcb7d6b
 	ErrConflictNetworkHosts validationError = "conflicting options: custom host-to-IP mapping and the network mode"
2b7ad47b
 	// ErrConflictNetworkPublishPorts conflict between the publish options and the network mode
ebcb7d6b
 	ErrConflictNetworkPublishPorts validationError = "conflicting options: port publishing and the container type network mode"
2b7ad47b
 	// ErrConflictNetworkExposePorts conflict between the expose option and the network mode
ebcb7d6b
 	ErrConflictNetworkExposePorts validationError = "conflicting options: port exposing and the container type network mode"
7126ecd0
 	// ErrUnsupportedNetworkAndIP conflict between network mode and requested ip address
ebcb7d6b
 	ErrUnsupportedNetworkAndIP validationError = "user specified IP address is supported on user defined networks only"
7126ecd0
 	// ErrUnsupportedNetworkNoSubnetAndIP conflict between network with no configured subnet and requested ip address
ebcb7d6b
 	ErrUnsupportedNetworkNoSubnetAndIP validationError = "user specified IP address is supported only when connecting to networks with user configured subnets"
dda513ef
 	// ErrUnsupportedNetworkAndAlias conflict between network mode and alias
ebcb7d6b
 	ErrUnsupportedNetworkAndAlias validationError = "network-scoped alias is supported only for containers in user defined networks"
3f445e63
 	// ErrConflictUTSHostname conflict between the hostname and the UTS mode
ebcb7d6b
 	ErrConflictUTSHostname validationError = "conflicting options: hostname and the UTS mode"
2b7ad47b
 )
ebcb7d6b
 
 type validationError string
 
 func (e validationError) Error() string {
 	return string(e)
 }
 
 func (e validationError) InvalidParameter() {}