github.com/brandon-bethke-neudesic/moby@v1.13.1/runconfig/errors.go (about)

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