docker_check_setup
Verify Docker installation and runtime status to ensure proper setup for containerization workflows.
Instructions
Verify Docker is installed and running correctly
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.js:139-173 (handler)The handler function that checks Docker installation, daemon status, Compose availability, and user group membership, returning formatted check results.export async function dockerCheckSetup() { const checks = []; const versionResult = await commandRunner("docker --version"); if (versionResult.success) { checks.push(`[OK] Docker installed: ${versionResult.stdout}`); } else { checks.push(`[FAIL] Docker not installed. Install from: https://docs.docker.com/get-docker/`); return { content: [{ type: "text", text: checks.join("\n") }] }; } const psResult = await commandRunner("docker ps"); if (psResult.success) { checks.push(`[OK] Docker daemon is running`); } else { checks.push(`[FAIL] Docker daemon not running. Start with: sudo systemctl start docker`); } const composeResult = await commandRunner("docker compose version"); if (composeResult.success) { checks.push(`[OK] Docker Compose: ${composeResult.stdout}`); } else { checks.push(`[WARN] Docker Compose not found (optional)`); } const whoamiResult = await commandRunner("whoami"); const groupResult = await commandRunner("groups"); if (groupResult.success && groupResult.stdout.includes("docker")) { checks.push(`[OK] User is in docker group`); } else { checks.push(`[WARN] User not in docker group. May need sudo. Fix with:\n sudo usermod -aG docker ${whoamiResult.stdout}\n Then log out and back in.`); } return { content: [{ type: "text", text: checks.join("\n") }] }; }
- src/tools.js:576-597 (registration)The exported tools object that registers dockerCheckSetup among other MCP tools for the server to use.export const tools = { // Git gitStatusExplained, gitBranchExplained, gitCommitGuided, // Docker dockerCheckSetup, dockerAnalyzeProject, dockerBuild, // GitHub githubSecretsList, githubSecretsSet, // Azure azureCheckCli, azureAcrSetup, azureContainerAppsDeploy, // SonarCloud sonarcloudSetupGuide, sonarcloudCreateConfig, // Onboarding devOnboardingCheck, };