{"id":"e32ee458a0dac2d8","repo":"docker/cli","slug":"invalid-mount-config-for-type-bind-field-source","errorCode":null,"errorMessage":"invalid mount config for type \"bind\": field Source must not be empty","messagePattern":"invalid mount config for type \"bind\": field Source must not be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/compose/loader/loader.go","lineNumber":493,"sourceCode":"\t\t\tenvVars = append(envVars, fileVars...)\n\t\t}\n\t\tupdateEnvironment(environment,\n\t\t\topts.ConvertKVStringsToMapWithNil(envVars), lookupEnv)\n\t}\n\n\tupdateEnvironment(environment, serviceConfig.Environment, lookupEnv)\n\tserviceConfig.Environment = environment\n\treturn nil\n}\n\nfunc resolveVolumePaths(volumes []types.ServiceVolumeConfig, workingDir string, lookupEnv template.Mapping) error {\n\tfor i, volume := range volumes {\n\t\tif volume.Type != \"bind\" {\n\t\t\tcontinue\n\t\t}\n\n\t\tif volume.Source == \"\" {\n\t\t\treturn errors.New(`invalid mount config for type \"bind\": field Source must not be empty`)\n\t\t}\n\n\t\tfilePath := expandUser(volume.Source, lookupEnv)\n\t\t// Check if source is an absolute path (either Unix or Windows), to\n\t\t// handle a Windows client with a Unix daemon or vice-versa.\n\t\t//\n\t\t// Note that this is not required for Docker for Windows when specifying\n\t\t// a local Windows path, because Docker for Windows translates the Windows\n\t\t// path into a valid path within the VM.\n\t\tif !path.IsAbs(filePath) && !isAbs(filePath) {\n\t\t\tfilePath = absPath(workingDir, filePath)\n\t\t}\n\t\tvolume.Source = filePath\n\t\tvolumes[i] = volume\n\t}\n\treturn nil\n}\n","sourceCodeStart":475,"sourceCodeEnd":511,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/compose/loader/loader.go#L475-L511","documentation":"Error \"invalid mount config for type \"bind\": field Source must not be empty\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/compose/loader/loader.go:493 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}