Skip to content

Upgrade process after installing with install-docker-ce.ps1 #614

Closed

Description

I have a number of machines that have docker installed using the script helpful_tools/Install-DockerCE/install-docker-ce.ps1 as per the documentation https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=dockerce#windows-server-2

My hosts have then been setup to be a swarm cluster

A lot of the original hosts now have an outdated version of docker which needs updating to remain compatible with new hosts that have the latest version of docker installed.

Is there an upgrade process other than uninstalling and then reinstalling using the script?

Activity

  1. github-actions commented on Sep 29, 2025

    @github-actions

    Thank you for creating an Issue. Please note that GitHub is not an official channel for Microsoft support requests. To create an official support request, please open a ticket here. Microsoft and the GitHub Community strive to provide a best effort in answering questions and supporting Issues on GitHub.

  2. ntrappe-cmu commented on Nov 7, 2025

    @ntrappe-cmu

    There's a PR out but it hasn't been approved yet.

  3. gerneio commented on Nov 12, 2025

    @gerneio

    This PR I'm assuming #599?

  4. nagulshaik199 commented on May 15, 2026

    @nagulshaik199

    Hi Andrew Fisher (@andyfisher100),

    Thank you for your patience. We've successfully reproduced this issue and have a verified workaround.


    Environment Reproduced

    Node Role Engine Version
    Manager Leader 29.4.0
    Worker Worker 29.4.3

    Root Cause

    Docker CE on Windows does not have a built-in upgrade command. Nodes installed at different times can end up on different engine versions, causing a version mismatch across the swarm.


    Verified Workaround — In-Place Binary Replacement

    Follow these steps on each node that needs to be upgraded, starting with worker nodes first, then managers one at a time.

    Step 1: Drain the Node

    Run this from a manager node to safely reschedule workloads:

    docker node update --availability drain <node-name>

    Step 2: Stop the Docker Service

    On the target node, stop Docker:

    Stop-Service docker

    Step 3: Download the Desired Docker CE Binaries

    Download dockerd.exe and docker.exe from the official Moby Releases page for your target version.

    Step 4: Replace the Existing Binaries

    Replace the binaries in the Docker installation directory:

    C:\Program Files\Docker\
    

    Step 5: Restart the Docker Service

    Start-Service docker

    Step 6: Re-Activate the Node

    From a manager node, set the node back to active:

    docker node update --availability active <node-name>

    Step 7: Verify the Upgrade

    docker node ls

    Confirm the node now shows the expected engine version.


    Important Notes

    • ✅ This approach preserves containers, images, networks, and swarm membership — no need to rejoin the swarm
    • ⚠️ Upgrade worker nodes first, then managers one at a time to maintain quorum
    • 🔁 Run docker node ls after each node upgrade to verify version consistency
    • 🛑 If anything goes wrong, restore the original binaries and restart the service to roll back

    Conclusion

    We have verified this workaround in our reproduction environment and confirmed that services continue to run without disruption across nodes after the upgrade.

    Please let us know if you have any questions or run into issues applying these steps.

  5. nagulshaik199 commented on Jun 3, 2026

    @nagulshaik199

    Hi Andrew Fisher (@andyfisher100),

    we shared the reproduction steps along with the verified fix on this thread approximately two weeks ago. Since we haven't heard back, we'll go ahead and close this issue for now. If you need any further assistance or run into additional concerns, please don't hesitate to reopen it. We're happy to help.

  6. andyfisher100 commented on Jun 10, 2026

    @andyfisher100
    Author

    I have tested the steps and this worked well for me. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedtriageNew and needs attention

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions