docker/cli ยท error
invalid pull option: '%s': must be one of %q, %q or %q
Error message
invalid pull option: '%s': must be one of %q, %q or %q
What it means
Error "invalid pull option: '%s': must be one of %q, %q or %q" thrown in docker/cli.
Source
Thrown at cli/command/container/create.go:388
}); err != nil {
response.Warnings = append(response.Warnings, fmt.Sprintf("injecting docker config.json into container failed: %v", err))
}
}
for _, w := range response.Warnings {
_, _ = fmt.Fprintln(dockerCLI.Err(), "WARNING:", w)
}
err = containerIDFile.Write(response.ID)
return response.ID, err
}
func validatePullOpt(val string) error {
switch val {
case PullImageAlways, PullImageMissing, PullImageNever, "":
// valid option, but nothing to do yet
return nil
default:
return fmt.Errorf(
"invalid pull option: '%s': must be one of %q, %q or %q",
val,
PullImageAlways,
PullImageMissing,
PullImageNever,
)
}
}
// copyDockerConfigIntoContainer takes the client configuration and copies it
// into the container.
//
// The path should be an absolute path in the container, commonly
// /root/.docker/config.json.
func copyDockerConfigIntoContainer(ctx context.Context, apiClient client.APIClient, containerID string, configPath string, config *configfile.ConfigFile) error {
var configBuf bytes.Buffer
if err := config.SaveToWriter(&configBuf); err != nil {
return fmt.Errorf("saving creds: %w", err)View on GitHub (pinned to e9452d6e78)
When it happens
Trigger: Thrown at cli/command/container/create.go:388 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/64f694dffbecaa7a.json.
Report an issue: GitHub.