Skip to content

Improve Docker validation error messages to be actionable#20350

Merged
pelikhan merged 3 commits intomainfrom
copilot/improve-docker-error-messages
Mar 10, 2026
Merged

Improve Docker validation error messages to be actionable#20350
pelikhan merged 3 commits intomainfrom
copilot/improve-docker-error-messages

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

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

  • Docker not installed: now links to https://docs.docker.com/get-started/get-docker to guide users to install Docker
  • Docker daemon not running: clarifies "Start Docker Desktop or the Docker daemon"

Before:

docker not installed - could not validate container image 'foo'. Install Docker or remove container-based tools
docker daemon not running - could not validate container image 'foo'. Start Docker Desktop or remove container-based tools

After:

docker not installed - could not validate container image 'foo'. To use container-based MCP servers, install Docker (https://docs.docker.com/get-started/get-docker)
docker daemon not running - could not validate container image 'foo'. Start Docker Desktop or the Docker daemon

💡 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.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Docker validation error messages for clarity Improve Docker validation error messages to be actionable Mar 10, 2026
@pelikhan
Copy link
Contributor

@copilot docker is required. Do not recommend removing container.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 10, 2026

@copilot docker is required. Do not recommend removing container.

Removed the suggestion to remove container: entries from both error messages (commit f363827). The messages now just direct users to install Docker or start the daemon.

@pelikhan pelikhan marked this pull request as ready for review March 10, 2026 12:06
Copilot AI review requested due to automatic review settings March 10, 2026 12:06
@pelikhan pelikhan merged commit 05848a9 into main Mar 10, 2026
@pelikhan pelikhan deleted the copilot/improve-docker-error-messages branch March 10, 2026 12:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Docker Validation Error Messages for Clarity

3 participants