Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 18, 2025

Description

Adds version checking for Docker and Podman in the aspire doctor command. Detects outdated container runtimes and warns users to upgrade.

Changes:

  • Added minimum version constants: Docker 28.0.0, Podman 5.0.0
  • Uses version -f json for reliable version parsing from both runtimes
  • Compares detected version against minimum, warns if too old
  • Displays version in success message: "Docker detected and running (version 28.0.4)"
  • Falls back to text parsing if JSON unavailable

Example output with outdated Docker:

⚠  Docker version 27.5.1 is below the minimum required version 28.0.0
   Upgrade Docker to version 28.0.0 or later from: https://www.docker.com/products/docker-desktop

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?
Original prompt

Add docker/podman version to the aspire doctor check. Check for really old versions of docker or podman.


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

Copilot AI self-assigned this Dec 18, 2025
Copilot AI and others added 2 commits December 18, 2025 22:54
- Add minimum version constants (Docker 20.10.0, Podman 4.0.0)
- Parse version from container runtime --version output
- Warn if detected version is below minimum required
- Display version in pass message for successful checks
- Add comprehensive unit tests for version parsing

Co-authored-by: davidfowl <[email protected]>
- Change from --version to 'version -f json' for more reliable parsing
- Add ParseVersionFromJsonOutput method to parse Client.Version from JSON
- Keep ParseVersionFromOutput as fallback for non-JSON output
- Add comprehensive tests for JSON version parsing

Co-authored-by: davidfowl <[email protected]>
Copilot AI changed the title [WIP] Add docker and podman version check to aspire doctor Add Docker/Podman version check to aspire doctor command Dec 18, 2025
Copilot AI requested a review from davidfowl December 18, 2025 23:08
@davidfowl
Copy link
Member

@copilot If we set a min supported Docker version of 28.0.0, that feels pretty reasonable
For Podman I'd just set a minimum supported version of 5.0

Per feedback from @davidfowl, updated the minimum supported versions:
- Docker: 28.0.0 (was 20.10.0)
- Podman: 5.0.0 (was 4.0.0)

Co-authored-by: davidfowl <[email protected]>
Copy link
Contributor Author

Copilot AI commented Dec 19, 2025

@copilot If we set a min supported Docker version of 28.0.0, that feels pretty reasonable
For Podman I'd just set a minimum supported version of 5.0

Updated minimum versions to Docker 28.0.0 and Podman 5.0.0 in commit 4de5db4.

@github-actions
Copy link
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13650

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13650"

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.

2 participants