package errors
import "github.com/docker/docker/errors"
Index ¶
Variables ¶
var ( // ErrorCodeAtLeastOneArg is generated when the parser comes across a // Dockerfile command that doesn't have any args. ErrorCodeAtLeastOneArg = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "ATLEASTONEARG", Message: "%s requires at least one argument", Description: "The specified command requires at least one argument", HTTPStatusCode: http.StatusInternalServerError, }) // ErrorCodeExactlyOneArg is generated when the parser comes across a // Dockerfile command that requires exactly one arg but got less/more. ErrorCodeExactlyOneArg = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EXACTLYONEARG", Message: "%s requires exactly one argument", Description: "The specified command requires exactly one argument", HTTPStatusCode: http.StatusInternalServerError, }) // ErrorCodeAtLeastTwoArgs is generated when the parser comes across a // Dockerfile command that requires at least two args but got less. ErrorCodeAtLeastTwoArgs = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "ATLEASTTWOARGS", Message: "%s requires at least two arguments", Description: "The specified command requires at least two arguments", HTTPStatusCode: http.StatusInternalServerError, }) // ErrorCodeTooManyArgs is generated when the parser comes across a // Dockerfile command that has more args than it should ErrorCodeTooManyArgs = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "TOOMANYARGS", Message: "Bad input to %s, too many args", Description: "The specified command was passed too many arguments", HTTPStatusCode: http.StatusInternalServerError, }) // ErrorCodeChainOnBuild is generated when the parser comes across a // Dockerfile command that is trying to chain ONBUILD commands. ErrorCodeChainOnBuild = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "CHAINONBUILD", Message: "Chaining ONBUILD via `ONBUILD ONBUILD` isn't allowed", Description: "ONBUILD Dockerfile commands aren't allow on ONBUILD commands", HTTPStatusCode: http.StatusInternalServerError, }) // ErrorCodeBadOnBuildCmd is generated when the parser comes across a // an ONBUILD Dockerfile command with an invalid trigger/command. ErrorCodeBadOnBuildCmd = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "BADONBUILDCMD", Message: "%s isn't allowed as an ONBUILD trigger", Description: "The specified ONBUILD command isn't allowed", HTTPStatusCode: http.StatusInternalServerError, }) // ErrorCodeMissingFrom is generated when the Dockerfile is missing // a FROM command. ErrorCodeMissingFrom = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "MISSINGFROM", Message: "Please provide a source image with `from` prior to run", Description: "The Dockerfile is missing a FROM command", HTTPStatusCode: http.StatusInternalServerError, }) // ErrorCodeNotOnWindows is generated when the specified Dockerfile // command is not supported on Windows. ErrorCodeNotOnWindows = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOTONWINDOWS", Message: "%s is not supported on Windows", Description: "The specified Dockerfile command is not supported on Windows", HTTPStatusCode: http.StatusInternalServerError, }) // ErrorCodeVolumeEmpty is generated when the specified Volume string // is empty. ErrorCodeVolumeEmpty = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "VOLUMEEMPTY", Message: "Volume specified can not be an empty string", Description: "The specified volume can not be an empty string", HTTPStatusCode: http.StatusInternalServerError, }) )
var ( ErrorCodeNoSuchContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOSUCHCONTAINER", Message: "no such id: %s", Description: "The specified container can not be found", HTTPStatusCode: http.StatusNotFound, }) ErrorCodeUnregisteredContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "UNREGISTEREDCONTAINER", Message: "Can't load storage driver for unregistered container %s", Description: "An attempt was made to load the storage driver for a container that is not registered with the daemon", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeContainerBeingRemoved = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "CONTAINERBEINGREMOVED", Message: "Container is marked for removal and cannot be started.", Description: "An attempt was made to start a container that is in the process of being deleted", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeUnpauseContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "UNPAUSECONTAINER", Message: "Container %s is paused. Unpause the container before stopping", Description: "The specified container is paused, before it can be stopped it must be unpaused", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeAlreadyPaused = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "ALREADYPAUSED", Message: "Container %s is already paused", Description: "The specified container is already in the paused state", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNotPaused = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOTPAUSED", Message: "Container %s is not paused", Description: "The specified container can not be unpaused because it is not in a paused state", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeImageUnregContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "IMAGEUNREGCONTAINER", Message: "Can't get image of unregistered container", Description: "An attempt to retrieve the image of a container was made but the container is not registered", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeEmptyID = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EMPTYID", Message: "Invalid empty id", Description: "An attempt was made to register a container but the container's ID can not be an empty string", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeLoggingFactory = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "LOGGINGFACTORY", Message: "Failed to get logging factory: %v", Description: "An attempt was made to register a container but the container's ID can not be an empty string", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeInitLogger = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "INITLOGGER", Message: "Failed to initialize logging driver: %v", Description: "An error occurred while trying to initialize the logging driver", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNotRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOTRUNNING", Message: "Container %s is not running", Description: "The specified action can not be taken due to the container not being in a running state", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeLinkNotRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "LINKNOTRUNNING", Message: "Cannot link to a non running container: %s AS %s", Description: "An attempt was made to link to a container but the container is not in a running state", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeDeviceInfo = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "DEVICEINFO", Message: "error gathering device information while adding custom device %q: %s", Description: "There was an error while trying to retrieve the information about a custom device", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeEmptyEndpoint = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EMPTYENDPOINT", Message: "invalid endpoint while building port map info", Description: "The specified endpoint for the port mapping is empty", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeEmptyNetwork = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EMPTYNETWORK", Message: "invalid networksettings while building port map info", Description: "The specified endpoint for the port mapping is empty", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeParsingPort = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "PARSINGPORT", Message: "Error parsing Port value(%v):%v", Description: "There was an error while trying to parse the specified 'port' value", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNoSandbox = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOSANDBOX", Message: "error locating sandbox id %s: %v", Description: "There was an error trying to located the specified networking sandbox", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNetworkUpdate = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NETWORKUPDATE", Message: "Update network failed: %v", Description: "There was an error trying to update the configuration information of the specified network sandbox", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNetworkRefresh = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NETWORKREFRESH", Message: "Update network failed: Failure in refresh sandbox %s: %v", Description: "There was an error trying to refresh the configuration information of the specified network sandbox", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeHostPort = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "HOSTPORT", Message: "Error parsing HostPort value(%s):%v", Description: "There was an error trying to parse the specified 'HostPort' value", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNetworkConflict = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NETWORKCONFLICT", Message: "conflicting options: publishing a service and network mode", Description: "It is not possible to publish a service when it is in network mode", HTTPStatusCode: http.StatusConflict, }) ErrorCodeJoinInfo = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "JOININFO", Message: "Updating join info failed: %v", Description: "There was an error during an attempt update a container's join information", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeIPCRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "IPCRUNNING", Message: "cannot join IPC of a non running container: %s", Description: "An attempt was made to join the IPC of a container, but the container is not running", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNotADir = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOTADIR", Message: "Cannot mkdir: %s is not a directory", Description: "An attempt was made create a directory, but the location in which it is being created is not a directory", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeParseContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "PARSECONTAINER", Message: "no container specified to join network", Description: "The specified reference to a container is missing a ':' as a separator between 'container' and 'name'/'id'", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeJoinSelf = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "JOINSELF", Message: "cannot join own network", Description: "An attempt was made to have a container join its own network", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeJoinRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "JOINRUNNING", Message: "cannot join network of a non running container: %s", Description: "An attempt to join the network of a container, but that container isn't running", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeModeNotContainer = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "MODENOTCONTAINER", Message: "network mode not set to container", Description: "An attempt was made to connect to a container's network but the mode wasn't set to 'container'", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeRemovingVolume = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "REMOVINGVOLUME", Message: "Error removing volumes:\n%v", Description: "There was an error while trying to remove the mount point (volume) of a container", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeInvalidNetworkMode = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "INVALIDNETWORKMODE", Message: "invalid network mode: %s", Description: "The specified networking mode is not valid", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeGetGraph = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "GETGRAPH", Message: "Failed to graph.Get on ImageID %s - %s", Description: "There was an error trying to retrieve the image for the specified image ID", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeGetLayer = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "GETLAYER", Message: "Failed to get layer path from graphdriver %s for ImageID %s - %s", Description: "There was an error trying to retrieve the layer of the specified image", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodePutLayer = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "PUTLAYER", Message: "Failed to put layer path from graphdriver %s for ImageID %s - %s", Description: "There was an error trying to store a layer for the specified image", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeGetLayerMetadata = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "GETLAYERMETADATA", Message: "Failed to get layer metadata - %s", Description: "There was an error trying to retrieve the metadata of a layer for the specified image", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeEmptyConfig = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EMPTYCONFIG", Message: "Config cannot be empty in order to create a container", Description: "While trying to create a container, the specified configuration information was empty", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNoSuchImageHash = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOSUCHIMAGEHASH", Message: "No such image: %s", Description: "An attempt was made to find an image by its hash, but the lookup failed", HTTPStatusCode: http.StatusNotFound, }) ErrorCodeNoSuchImageTag = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOSUCHIMAGETAG", Message: "No such image: %s:%s", Description: "An attempt was made to find an image by its name/tag, but the lookup failed", HTTPStatusCode: http.StatusNotFound, }) ErrorCodeMountOverFile = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "MOUNTOVERFILE", Message: "cannot mount volume over existing file, file exists %s", Description: "An attempt was made to mount a volume at the same location as a pre-existing file", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeMountSetup = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "MOUNTSETUP", Message: "Unable to setup mount point, neither source nor volume defined", Description: "An attempt was made to setup a mount point, but the source and destination are undefined", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeVolumeInvalidMode = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "VOLUMEINVALIDMODE", Message: "invalid mode for volumes-from: %s", Description: "An invalid 'mode' was specified in the mount request", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeVolumeInvalid = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "VOLUMEINVALID", Message: "Invalid volume specification: %s", Description: "An invalid 'volume' was specified in the mount request", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeVolumeAbs = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "VOLUMEABS", Message: "Invalid volume destination path: %s mount path must be absolute.", Description: "An invalid 'destination' path was specified in the mount request, it must be an absolute path", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeVolumeName = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "VOLUME_NAME_INVALID", Message: "%s includes invalid characters for a local volume name, only %s are allowed", Description: "The name of volume is invalid", HTTPStatusCode: http.StatusBadRequest, }) ErrorCodeVolumeFromBlank = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "VOLUMEFROMBLANK", Message: "malformed volumes-from specification: %s", Description: "An invalid 'destination' path was specified in the mount request, it must not be blank", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeVolumeMode = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "VOLUMEMODE", Message: "invalid mode for volumes-from: %s", Description: "An invalid 'mode' path was specified in the mount request", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeVolumeDup = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "VOLUMEDUP", Message: "Duplicate bind mount %s", Description: "An attempt was made to mount a volume but the specified destination location is already used in a previous mount", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeCantUnpause = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "CANTUNPAUSE", Message: "Cannot unpause container %s: %s", Description: "An error occurred while trying to unpause the specified container", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodePSError = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "PSError", Message: "Error running ps: %s", Description: "There was an error trying to run the 'ps' command in the specified container", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNoPID = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOPID", Message: "Couldn't find PID field in ps output", Description: "There was no 'PID' field in the output of the 'ps' command that was executed", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeBadPID = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "BADPID", Message: "Unexpected pid '%s': %s", Description: "While trying to parse the output of the 'ps' command, the 'PID' field was not an integer", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNoTop = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOTOP", Message: "Top is not supported on Windows", Description: "The 'top' command is not supported on Windows", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeStopped = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "STOPPED", Message: "Container already stopped", Description: "An attempt was made to stop a container, but the container is already stopped", HTTPStatusCode: http.StatusNotModified, }) ErrorCodeCantStop = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "CANTSTOP", Message: "Cannot stop container %s: %s\n", Description: "An error occurred while tring to stop the specified container", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeBadCPUFields = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "BADCPUFIELDS", Message: "invalid number of cpu fields", Description: "While reading the '/proc/stat' file, the number of 'cpu' fields is less than 8", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeBadCPUInt = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "BADCPUINT", Message: "Unable to convert value %s to int: %s", Description: "While reading the '/proc/stat' file, the 'CPU' field could not be parsed as an integer", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeBadStatFormat = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "BADSTATFORMAT", Message: "invalid stat format", Description: "There was an error trying to parse the '/proc/stat' file", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeTimedOut = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "TIMEDOUT", Message: "Timed out: %v", Description: "A timer expired", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeAlreadyRemoving = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "ALREADYREMOVING", Message: "Status is already RemovalInProgress", Description: "An attempt to remove a container was made, but the container is already in the process of being removed", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeStartPaused = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "STARTPAUSED", Message: "Cannot start a paused container, try unpause instead.", Description: "An attempt to start a container was made, but the container is paused. Unpause it first", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeAlreadyStarted = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "ALREADYSTARTED", Message: "Container already started", Description: "An attempt to start a container was made, but the container is already started", HTTPStatusCode: http.StatusNotModified, }) ErrorCodeHostConfigStart = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "HOSTCONFIGSTART", Message: "Supplying a hostconfig on start is not supported. It should be supplied on create", Description: "The 'start' command does not accept 'HostConfig' data, try using the 'create' command instead", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeCantStart = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "CANTSTART", Message: "Cannot start container %s: %s", Description: "There was an error while trying to start a container", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeCantRestart = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "CANTRESTART", Message: "Cannot restart container %s: %s", Description: "There was an error while trying to restart a container", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeEmptyRename = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EMPTYRENAME", Message: "Neither old nor new names may be empty", Description: "An attempt was made to rename a container but either the old or new names were blank", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeRenameTaken = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "RENAMETAKEN", Message: "Error when allocating new name: %s", Description: "The new name specified on the 'rename' command is already being used", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeRenameDelete = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "RENAMEDELETE", Message: "Failed to delete container %q: %v", Description: "There was an error trying to delete the specified container", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodePauseError = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "PAUSEERROR", Message: "Cannot pause container %s: %s", Description: "There was an error trying to pause the specified container", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNeedStream = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NEEDSTREAM", Message: "You must choose at least one stream", Description: "While trying to stream a container's logs, no output stream was specified", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeDanglingOne = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "DANLGINGONE", Message: "Conflict: cannot use more than 1 value for `dangling` filter", Description: "The specified 'dangling' filter may not have more than one value", HTTPStatusCode: http.StatusConflict, }) ErrorCodeImgDelUsed = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "IMGDELUSED", Message: "conflict: unable to remove repository reference %q (must force) - container %s is using its referenced image %s", Description: "An attempt was made to delete an image but it is currently being used", HTTPStatusCode: http.StatusConflict, }) ErrorCodeImgNoParent = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "IMGNOPARENT", Message: "unable to get parent image: %v", Description: "There was an error trying to find an image's parent, it was not in the graph", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeExportFailed = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EXPORTFAILED", Message: "%s: %s", Description: "There was an error during an export operation", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeExecResize = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EXECRESIZE", Message: "Exec %s is not running, so it can not be resized.", Description: "An attempt was made to resize an 'exec', but the 'exec' is not running", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeContainerNotRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "CONTAINERNOTRUNNING", Message: "Container %s is not running: %s", Description: "An attempt was made to retrieve the information about an 'exec' but the container is not running", HTTPStatusCode: http.StatusConflict, }) ErrorCodeNoExecID = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOEXECID", Message: "No such exec instance '%s' found in daemon", Description: "The specified 'exec' instance could not be found", HTTPStatusCode: http.StatusNotFound, }) ErrorCodeExecPaused = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EXECPAUSED", Message: "Container %s is paused, unpause the container before exec", Description: "An attempt to start an 'exec' was made, but the owning container is paused", HTTPStatusCode: http.StatusConflict, }) ErrorCodeExecRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EXECRUNNING", Message: "Error: Exec command %s is already running", Description: "An attempt to start an 'exec' was made, but 'exec' is already running", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeExecCantRun = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EXECCANTRUN", Message: "Cannot run exec command %s in container %s: %s", Description: "An attempt to start an 'exec' was made, but an error occurred", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeExecAttach = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EXECATTACH", Message: "attach failed with error: %s", Description: "There was an error while trying to attach to an 'exec'", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeExecContainerStopped = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "EXECCONTAINERSTOPPED", Message: "container stopped while running exec", Description: "An attempt was made to start an 'exec' but the owning container is in the 'stopped' state", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeDefaultName = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "DEFAULTNAME", Message: "Conflict, cannot remove the default name of the container", Description: "An attempt to delete the default name of a container was made, but that is not allowed", HTTPStatusCode: http.StatusConflict, }) ErrorCodeNoParent = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOPARENT", Message: "Cannot get parent %s for name %s", Description: "An attempt was made to delete a container but its parent image could not be found", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeCantDestroy = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "CANTDESTROY", Message: "Cannot destroy container %s: %v", Description: "An attempt was made to delete a container but it failed", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeRmRunning = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "RMRUNNING", Message: "Conflict, You cannot remove a running container. Stop the container before attempting removal or use -f", Description: "An attempt was made to delete a container but the container is still running, try to either stop it first or use '-f'", HTTPStatusCode: http.StatusConflict, }) ErrorCodeRmFailed = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "RMFAILED", Message: "Could not kill running container, cannot remove - %v", Description: "An error occurred while trying to delete a running container", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeRmNotFound = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "RMNOTFOUND", Message: "Could not kill running container, cannot remove - %v", Description: "An attempt to delete a container was made but the container could not be found", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeRmState = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "RMSTATE", Message: "Failed to set container state to RemovalInProgress: %s", Description: "An attempt to delete a container was made, but there as an error trying to set its state to 'RemovalInProgress'", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeRmDriverFS = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "RMDRIVERFS", Message: "Driver %s failed to remove root filesystem %s: %s", Description: "While trying to delete a container, the driver failed to remove the root filesystem", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeRmInit = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "RMINIT", Message: "Driver %s failed to remove init filesystem %s: %s", Description: "While trying to delete a container, the driver failed to remove the init filesystem", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeRmFS = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "RMFS", Message: "Unable to remove filesystem for %v: %v", Description: "While trying to delete a container, the driver failed to remove the filesystem", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeRmExecDriver = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "RMEXECDRIVER", Message: "Unable to remove execdriver data for %s: %s", Description: "While trying to delete a container, there was an error trying to remove th exec driver data", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeRmVolumeInUse = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "RMVOLUMEINUSE", Message: "Conflict: %v", Description: "While trying to delete a container, one of its volumes is still being used", HTTPStatusCode: http.StatusConflict, }) ErrorCodeRmVolume = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "RMVOLUME", Message: "Error while removing volume %s: %v", Description: "While trying to delete a container, there was an error trying to delete one of its volumes", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeInvalidCpusetCpus = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "INVALIDCPUSETCPUS", Message: "Invalid value %s for cpuset cpus.", Description: "While verifying the container's 'HostConfig', CpusetCpus value was in an incorrect format", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeInvalidCpusetMems = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "INVALIDCPUSETMEMS", Message: "Invalid value %s for cpuset mems.", Description: "While verifying the container's 'HostConfig', CpusetMems value was in an incorrect format", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNotAvailableCpusetCpus = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOTAVAILABLECPUSETCPUS", Message: "Requested CPUs are not available - requested %s, available: %s.", Description: "While verifying the container's 'HostConfig', cpuset CPUs provided aren't available in the container's cgroup available set", HTTPStatusCode: http.StatusInternalServerError, }) ErrorCodeNotAvailableCpusetMems = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NOTAVAILABLECPUSETMEMS", Message: "Requested memory nodes are not available - requested %s, available: %s.", Description: "" /* 133 byte string literal not displayed */, HTTPStatusCode: http.StatusInternalServerError, }) ErrorVolumeNameTaken = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "VOLUME_NAME_TAKEN", Message: "A volume name %s already exists with the %s driver. Choose a different volume name.", Description: "An attempt to create a volume using a driver but the volume already exists with a different driver", HTTPStatusCode: http.StatusInternalServerError, }) )
var ( // ErrorCodeNewerClientVersion is generated when a request from a client // specifies a higher version than the server supports. ErrorCodeNewerClientVersion = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NEWERCLIENTVERSION", Message: "client is newer than server (client API version: %s, server API version: %s)", Description: "The client version is higher than the server version", HTTPStatusCode: http.StatusBadRequest, }) // ErrorCodeOldClientVersion is generated when a request from a client // specifies a version lower than the minimum version supported by the server. ErrorCodeOldClientVersion = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "OLDCLIENTVERSION", Message: "client version %s is too old. Minimum supported API version is %s, please upgrade your client to a newer version", Description: "The client version is too old for the server", HTTPStatusCode: http.StatusBadRequest, }) // ErrorNetworkControllerNotEnabled is generated when the networking stack in not enabled // for certain platforms, like windows. ErrorNetworkControllerNotEnabled = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "NETWORK_CONTROLLER_NOT_ENABLED", Message: "the network controller is not enabled for this platform", Description: "Docker's networking stack is disabled for this platform", HTTPStatusCode: http.StatusNotFound, }) )
var ( // ErrorCodeInvalidImageID is generated when image id specified is incorrectly formatted. ErrorCodeInvalidImageID = errcode.Register(errGroup, errcode.ErrorDescriptor{ Value: "INVALIDIMAGEID", Message: "image ID '%s' is invalid ", Description: "The specified image id is incorrectly formatted", HTTPStatusCode: http.StatusInternalServerError, }) )
Source Files ¶
builder.go daemon.go error.go image.go server.go
- Version
- v1.9.1
- Published
- Nov 20, 2015
- Platform
- js/wasm
- Imports
- 2 packages
- Last checked
- 1 second ago –
Tools for package owners.