Improve Docker validation error messages to be actionable#20350
Improve Docker validation error messages to be actionable#20350
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot docker is required. Do not recommend removing container. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Improves Docker-related validation errors so users get clear, actionable guidance when Docker is missing or the daemon isn’t running.
Changes:
- Updates the “docker not installed” validation error to include explicit guidance plus a Docker installation link.
- Updates the “docker daemon not running” validation error to clarify that Docker Desktop or the Docker daemon must be started.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| if err != nil { | ||
| dockerValidationLog.Print("Docker not installed, cannot validate image") | ||
| return fmt.Errorf("docker not installed - could not validate container image '%s'. Install Docker or remove container-based tools", image) | ||
| return fmt.Errorf("docker not installed - could not validate container image '%s'. To use container-based MCP servers, install Docker (https://docs.docker.com/get-started/get-docker)", image) |
There was a problem hiding this comment.
The Docker install URL is hardcoded inside this error string and formatted differently than other user-facing validation errors (which usually end with a "See: ..." link and centralize URLs in constants, e.g., this file’s other errors use constants.DocsToolsURL). Consider extracting the Docker install link into a shared constant (e.g., in pkg/constants) and using the same "See:" style for consistency and easier future updates.
| return fmt.Errorf("docker not installed - could not validate container image '%s'. To use container-based MCP servers, install Docker (https://docs.docker.com/get-started/get-docker)", image) | |
| return fmt.Errorf("docker not installed - could not validate container image '%s'. To use container-based MCP servers, install Docker. See: %s", image, constants.DocsToolsURL) |
The Docker validation errors for "not installed" and "daemon not running" told users to "remove container-based tools" — vague guidance that didn't explain what to change or where.
Changes
https://docs.docker.com/get-started/get-dockerto guide users to install DockerBefore:
After:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.