docker/cli ยท error
%s: invalid replicas value %s: %v
Error message
%s: invalid replicas value %s: %v
What it means
Error "%s: invalid replicas value %s: %v" thrown in docker/cli.
Source
Thrown at cli/command/service/scale.go:69
)
}
}
return nil
}
func runScale(ctx context.Context, dockerCLI command.Cli, options *scaleOptions, args []string) error {
apiClient := dockerCLI.Client()
var (
errs []error
serviceIDs = make([]string, 0, len(args))
)
for _, arg := range args {
serviceID, scaleStr, _ := strings.Cut(arg, "=")
// validate input arg scale number
scale, err := strconv.ParseUint(scaleStr, 10, 64)
if err != nil {
errs = append(errs, fmt.Errorf("%s: invalid replicas value %s: %v", serviceID, scaleStr, err))
continue
}
warnings, err := runServiceScale(ctx, apiClient, serviceID, scale)
if err != nil {
errs = append(errs, fmt.Errorf("%s: %v", serviceID, err))
continue
}
for _, warning := range warnings {
_, _ = fmt.Fprintln(dockerCLI.Err(), warning)
}
_, _ = fmt.Fprintf(dockerCLI.Out(), "%s scaled to %d\n", serviceID, scale)
serviceIDs = append(serviceIDs, serviceID)
}
if len(serviceIDs) > 0 && !options.detach {
for _, serviceID := range serviceIDs {
if err := WaitOnService(ctx, dockerCLI, serviceID, false); err != nil {View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at cli/command/service/scale.go:69 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/4787475ee51606bf.json.
Report an issue: GitHub.