upload uninstall script and docs#602
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
TestingTested across Windows 11, Server 2022, and Server 2025.
|
There was a problem hiding this comment.
Pull Request Overview
Adds a PowerShell script to cleanly uninstall Docker CE on Windows and updates documentation links and instructions to include the new script.
- Introduces
uninstall-docker-ce.ps1with safety checks, optional preservation flags, and cleanup routines - Updates top-level
helpful_tools/README.mdto reference both install and uninstall scripts - Extends
Install-DockerCE/README.mdwith detailed uninstall script usage, parameters, and examples
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| helpful_tools/README.md | Updated link text to include uninstall instructions |
| helpful_tools/Install-DockerCE/uninstall-docker-ce.ps1 | Added full uninstall script with service, binary, data, and registry cleanup |
| helpful_tools/Install-DockerCE/README.md | Extended documentation to cover uninstall-docker-ce.ps1 usage |
Comments suppressed due to low confidence (3)
helpful_tools/Install-DockerCE/uninstall-docker-ce.ps1:57
- [nitpick] The
KeepDataparameter overlaps withKeepImages,KeepVolumes, andKeepNetworksbut isn’t referenced in the main removal logic. Either removeKeepDataor integrate it consistently (and document its behavior) to avoid confusion.
$KeepData,
helpful_tools/Install-DockerCE/README.md:171
- The README lists
-Force,-KeepImages,-KeepVolumes, and-KeepNetworksbut does not document the-KeepDataparameter. Update the docs to include or remove-KeepDatabased on the final parameter set.
-Force [<SwitchParameter>]
helpful_tools/Install-DockerCE/uninstall-docker-ce.ps1:1
- [nitpick] This powerful uninstall script lacks automated or documented manual tests. Consider adding tests or a test plan to validate each uninstallation step and parameter combination across environments.
############################################################
| } | ||
| } | ||
| return $results | ||
| } -ArgumentList @(,$layerDirs) |
There was a problem hiding this comment.
The -ArgumentList @(,$layerDirs) syntax passes a null as the first argument, so the $layers parameter ends up empty. Replace with -ArgumentList $layerDirs or -ArgumentList @($layerDirs) to ensure $layers receives the array of directories.
| } -ArgumentList @(,$layerDirs) | |
| } -ArgumentList @($layerDirs) |
There was a problem hiding this comment.
@ntrappe-msft , I'm wondering if this copilot suggestion was helpful in your script or just nonsense?
|
I wonder why installation method is using all this PowerShell machinery instead of already existing mechanisms (MSI, AppxBundle, MSIX or whatever). |
|
We're trying to mirror the install script. |
This PR adds a comprehensive PowerShell script to uninstall Docker Community Edition from Windows systems, addressing the need for a clean removal process.
What's Added
uninstall-docker-ce.ps1ScriptA complete uninstall script that reverses the Docker CE installation by:
docker.exeanddockerd.exefrom System32Safety Features
-Forceparameter to skip confirmations for automation-Keep...parameter to preserve images/volumes/networks (i.e. Docker data directory)Parameters
Usage Examples
Documentation Updates
Install-DockerCE/README.mdwith complete documentation for the uninstall scriptDesign Principles
The script follows the same patterns and coding style as the existing
install-docker-ce.ps1, ensuring consistency and maintainability. It includes proper error handling, user feedback, and follows PowerShell best practices.Fixes #545.