docker/cli ยท error
read exceeds the defined limit
Error message
read exceeds the defined limit
What it means
Error "read exceeds the defined limit" thrown in docker/cli.
Source
Thrown at cli/context/store/io_utils.go:17
package store
import (
"errors"
"io"
)
// limitedReader is a fork of [io.LimitedReader] to override Read.
type limitedReader struct {
R io.Reader
N int64 // max bytes remaining
}
// Read is a fork of [io.LimitedReader.Read] that returns an error when limit exceeded.
func (l *limitedReader) Read(p []byte) (n int, err error) {
if l.N < 0 {
return 0, errors.New("read exceeds the defined limit")
}
if l.N == 0 {
return 0, io.EOF
}
// have to cap N + 1 otherwise we won't hit limit err
if int64(len(p)) > l.N+1 {
p = p[0 : l.N+1]
}
n, err = l.R.Read(p)
l.N -= int64(n)
return n, err
}
View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at cli/context/store/io_utils.go:17 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/8686993c2057a7e4.json.
Report an issue: GitHub.