{"id":"fa24a2fe84be4189","repo":"docker/cli","slug":"invalid-image-reference-for-service-s-w","errorCode":null,"errorMessage":"invalid image reference for service %s: %w","messagePattern":"invalid image reference for service (.+?): %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/stack/loader.go","lineNumber":60,"sourceCode":"\tunsupportedProperties := loader.GetUnsupportedProperties(dicts...)\n\tif len(unsupportedProperties) > 0 {\n\t\t_, _ = fmt.Fprintf(streams.Err(), \"Ignoring unsupported options: %s\\n\\n\",\n\t\t\tstrings.Join(unsupportedProperties, \", \"))\n\t}\n\n\tdeprecatedProperties := loader.GetDeprecatedProperties(dicts...)\n\tif len(deprecatedProperties) > 0 {\n\t\t_, _ = fmt.Fprintf(streams.Err(), \"Ignoring deprecated options:\\n\\n%s\\n\\n\",\n\t\t\tpropertyWarnings(deprecatedProperties))\n\t}\n\n\t// Validate if each service has a valid image-reference.\n\tfor _, svc := range config.Services {\n\t\tif svc.Image == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"invalid image reference for service %s: no image specified\", svc.Name)\n\t\t}\n\t\tif _, err := reference.ParseAnyReference(svc.Image); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid image reference for service %s: %w\", svc.Name, err)\n\t\t}\n\t}\n\n\treturn config, nil\n}\n\nfunc getDictsFrom(configFiles []composetypes.ConfigFile) []map[string]any {\n\tdicts := make([]map[string]any, 0, len(configFiles))\n\tfor _, configFile := range configFiles {\n\t\tdicts = append(dicts, configFile.Config)\n\t}\n\n\treturn dicts\n}\n\nfunc propertyWarnings(properties map[string]string) string {\n\tmsgs := make([]string, 0, len(properties))\n\tfor name, description := range properties {","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/stack/loader.go#L42-L78","documentation":"Error \"invalid image reference for service %s: %w\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/stack/loader.go:60 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}