docker/cli · error · invalidParameter
invalid detach keys (%s): %w
Error message
invalid detach keys (%s): %w
What it means
Error "invalid detach keys (%s): %w" thrown in docker/cli.
Source
Thrown at cli/command/container/hijack.go:38
// readCloserWrapper wraps an io.Reader, and implements an io.ReadCloser
// It calls the given callback function when closed.
type readCloserWrapper struct {
io.Reader
closer func() error
}
// Close calls back the passed closer function
func (r *readCloserWrapper) Close() error {
return r.closer()
}
func validateDetachKeys(keys string) error {
if keys == "" {
return nil
}
if _, err := term.ToBytes(keys); err != nil {
return invalidParameter(fmt.Errorf("invalid detach keys (%s): %w", keys, err))
}
return nil
}
// A hijackedIOStreamer handles copying input to and output from streams to the
// connection.
type hijackedIOStreamer struct {
streams command.Streams
inputStream io.ReadCloser
outputStream io.Writer
errorStream io.Writer
resp client.HijackedResponse
tty bool
detachKeys string
}
View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at cli/command/container/hijack.go:38 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/6fbc57c4b87bc528.json.
Report an issue: GitHub.