docker/cli ยท error
compose file contains unsupported options: %s
Error message
compose file contains unsupported options: %s
What it means
Error "compose file contains unsupported options: %s " thrown in docker/cli.
Source
Thrown at cli/command/stack/loader.go:35
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/compose/loader"
"github.com/docker/cli/cli/compose/schema"
composetypes "github.com/docker/cli/cli/compose/types"
)
// loadComposeFile parse the composefile specified in the cli and returns its configOptions and version.
func loadComposeFile(streams command.Streams, opts deployOptions) (*composetypes.Config, error) {
configDetails, err := getConfigDetails(opts.composefiles, streams.In())
if err != nil {
return nil, err
}
config, err := loader.Load(configDetails)
if err != nil {
var fpe *loader.ForbiddenPropertiesError
if errors.As(err, &fpe) {
// this error is intentionally formatted multi-line
return nil, fmt.Errorf("compose file contains unsupported options:\n\n%s\n", propertyWarnings(fpe.Properties)) //nolint:staticcheck // ignore ST1005
}
return nil, err
}
dicts := getDictsFrom(configDetails.ConfigFiles)
unsupportedProperties := loader.GetUnsupportedProperties(dicts...)
if len(unsupportedProperties) > 0 {
_, _ = fmt.Fprintf(streams.Err(), "Ignoring unsupported options: %s\n\n",
strings.Join(unsupportedProperties, ", "))
}
deprecatedProperties := loader.GetDeprecatedProperties(dicts...)
if len(deprecatedProperties) > 0 {
_, _ = fmt.Fprintf(streams.Err(), "Ignoring deprecated options:\n\n%s\n\n",
propertyWarnings(deprecatedProperties))
}
View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at cli/command/stack/loader.go:35 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of docker/cli@e9452d6e78 (2026-08-01).
Data as JSON: /data/errors/ab2041356b134926.json.
Report an issue: GitHub.