{"id":"ab2041356b134926","repo":"docker/cli","slug":"compose-file-contains-unsupported-options-s","errorCode":null,"errorMessage":"compose file contains unsupported options:\n\n%s\n","messagePattern":"compose file contains unsupported options:\n\n(.+?)\n","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/command/stack/loader.go","lineNumber":35,"sourceCode":"\t\"github.com/docker/cli/cli/command\"\n\t\"github.com/docker/cli/cli/compose/loader\"\n\t\"github.com/docker/cli/cli/compose/schema\"\n\tcomposetypes \"github.com/docker/cli/cli/compose/types\"\n)\n\n// loadComposeFile parse the composefile specified in the cli and returns its configOptions and version.\nfunc loadComposeFile(streams command.Streams, opts deployOptions) (*composetypes.Config, error) {\n\tconfigDetails, err := getConfigDetails(opts.composefiles, streams.In())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tconfig, err := loader.Load(configDetails)\n\tif err != nil {\n\t\tvar fpe *loader.ForbiddenPropertiesError\n\t\tif errors.As(err, &fpe) {\n\t\t\t// this error is intentionally formatted multi-line\n\t\t\treturn nil, fmt.Errorf(\"compose file contains unsupported options:\\n\\n%s\\n\", propertyWarnings(fpe.Properties)) //nolint:staticcheck // ignore ST1005\n\t\t}\n\n\t\treturn nil, err\n\t}\n\n\tdicts := getDictsFrom(configDetails.ConfigFiles)\n\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","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/cli/command/stack/loader.go#L17-L53","documentation":"Error \"compose file contains unsupported options:\n\n%s\n\" thrown in docker/cli.","triggerScenarios":"Thrown at cli/command/stack/loader.go:35 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}