{"record":{"id":"4a305436e17d91ad","repo":"hashicorp/nomad","slug":"the-image-does-not-exist-v","errorCode":null,"errorMessage":"the image does not exist: %v","messagePattern":"the image does not exist: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/docker/driver.go","lineNumber":751,"sourceCode":"\t}\n\n\td.coordinator.IncrementImageReference(dockerImage.ID, driverConfig.Image, task.ID)\n\tvar imageUser string\n\tif dockerImage.Config != nil {\n\t\timageUser = dockerImage.Config.User\n\t}\n\treturn dockerImage.ID, imageUser, nil\n}\n\nfunc (d *Driver) convertAllocPathsForWindowsLCOW(task *drivers.TaskConfig, image string) error {\n\tdockerClient, err := d.getDockerClient()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\timageConfig, err := dockerClient.ImageInspect(d.ctx, image)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"the image does not exist: %v\", err)\n\t}\n\t// LCOW If we are running a Linux Container on Windows, we need to mount it correctly, as c:\\ does not exist on unix\n\tif imageConfig.Os == \"linux\" {\n\t\ta := []rune(task.Env[taskenv.AllocDir])\n\t\ttask.Env[taskenv.AllocDir] = strings.ReplaceAll(string(a[2:]), \"\\\\\", \"/\")\n\t\tl := []rune(task.Env[taskenv.TaskLocalDir])\n\t\ttask.Env[taskenv.TaskLocalDir] = strings.ReplaceAll(string(l[2:]), \"\\\\\", \"/\")\n\t\ts := []rune(task.Env[taskenv.SecretsDir])\n\t\ttask.Env[taskenv.SecretsDir] = strings.ReplaceAll(string(s[2:]), \"\\\\\", \"/\")\n\t}\n\treturn nil\n}\n\nfunc (d *Driver) containerBinds(task *drivers.TaskConfig, driverConfig *TaskConfig) ([]string, error) {\n\ttaskLocalBindVolume := driverConfig.VolumeDriver == \"\"\n\tif !d.config.Volumes.Enabled && !taskLocalBindVolume {\n\t\treturn nil, fmt.Errorf(\"volumes are not enabled; cannot use volume driver %q\", driverConfig.VolumeDriver)\n\t}","sourceCodeStart":733,"sourceCodeEnd":769,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/drivers/docker/driver.go#L733-L769","documentation":"convertAllocPathsForWindowsLCOW inspects the pulled image via dockerClient.ImageInspect to determine the image OS for Linux-Containers-on-Windows path rewriting. This error means the inspect call failed — practically, the image ID/reference is not present in the Docker daemon. It is raised in StartTask after the image was supposed to be created.","triggerScenarios":"ImageInspect fails for the resolved image — e.g. the pull failed but the error was swallowed earlier, the image was garbage-collected between pull and inspect, a dangling/none reference was passed, or the daemon reports a network/registry error during inspect.","commonSituations":"Windows (LCOW) setups where the pull silently failed, images pruned by 'docker system prune' during the race, wrong image tag resolved to an untagged (none) image, or Docker daemon connectivity issues.","solutions":["Run `docker images` on the client host to confirm the image and tag exist on the daemon.","Check earlier logs for pull failures — fix the root pull error first.","Disable aggressive image GC/pruning on the client or pin images by digest.","Verify Docker daemon is healthy (`docker info`) and reachable."],"exampleFix":"// before\nimage = \"myapp:latest\" // tag moved, image is <none>\n// after\nimage = \"myapp@sha256:abcdef...\" // pin by digest","handlingStrategy":"try-catch","validationCode":"// verify image exists before task start\nout, err := exec.Command(\"docker\", \"image\", \"inspect\", imageRef).Output()\nif err != nil { /* image absent on daemon; force re-pull */ }","typeGuard":null,"tryCatchPattern":"if err != nil {\n\tif strings.Contains(err.Error(), \"the image does not exist\") {\n\t\t// force pull / re-create image and retry StartTask once\n\t}\n\treturn err\n}","preventionTips":["Pin images by digest to survive tag moves","Avoid `docker system prune` on Nomad clients while allocations run","Monitor pull logs earlier in StartTask for root failures"],"tags":["docker","windows","lcow","image-inspect"],"backgroundTag":"image-not-found","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}