docker/cli ยท error
invalid interpolation format for %s: %#v; you may need to es
Error message
invalid interpolation format for %s: %#v; you may need to escape any $ with another $
What it means
Error "invalid interpolation format for %s: %#v; you may need to escape any $ with another $" thrown in docker/cli.
Source
Thrown at cli/compose/interpolation/interpolation.go:107
interpolatedElem, err := recursiveInterpolate(elem, path.Next(PathMatchList), opts)
if err != nil {
return nil, err
}
out[i] = interpolatedElem
}
return out, nil
default:
return value, nil
}
}
func newPathError(path Path, err error) error {
switch err := err.(type) {
case nil:
return nil
case *template.InvalidTemplateError:
return fmt.Errorf(
"invalid interpolation format for %s: %#v; you may need to escape any $ with another $",
path, err.Template)
default:
return fmt.Errorf("error while interpolating %s: %w", path, err)
}
}
const pathSeparator = "."
// PathMatchAll is a token used as part of a Path to match any key at that level
// in the nested structure
const PathMatchAll = "*"
// PathMatchList is a token used as part of a Path to match items in a list
const PathMatchList = "[]"
// Path is a dotted path of keys to a value in a nested mapping structure. A *
// section in a path will match any key in the mapping structure.View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at cli/compose/interpolation/interpolation.go:107 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/1c1b60468527e840.json.
Report an issue: GitHub.