Skip to content

Docker Desktop tries to update wsl each startup #13868

Closed

Description

@anton-filatov

Description

Docker Desktop fails to determine wsl version if windows system locale differs from en. This leads to attempt to upgrade wsl which triggers UAC elevation prompt for "Docker Desktop Privileged Helper" for program location ["C:\Program Files\Docker\Docker\resources\com.docker.admin.exe" wsl-update].

After startup Docker works fine, but UAC elevation prompt is annoying.

Looks like the problem is similar to #13518, #13524. Also #13806 may have the same reason.

Reproduce

  1. Switch to ru locale (Start > Settings > Time & Language > Region > Regional format).
  2. Check wsl version, should be:
wsl --version
Версия WSL: 2.0.14.0
Версия ядра: 5.15.133.1-1
Версия WSLg: 1.0.59
Версия MSRDC: 1.2.4677
Версия Direct3D: 1.611.1-81528511
Версия DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Версия Windows: 10.0.19045.3693
  1. Start Docker Desktop.

Expected behavior

There is no attempt to update wsl.

docker version

Client:
 Cloud integration: v1.0.35+desktop.5
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:08:44 2023
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.26.1 (131620)
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:08:02 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.25
  GitCommit:        d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
 runc:
  Version:          1.1.10
  GitCommit:        v1.1.10-0-g18a0cb0
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.0-desktop.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.23.3-desktop.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.21
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  0.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-feedback.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.10
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scan.exe
  scout: Docker Scout (Docker Inc.)
    Version:  v1.2.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 24.0.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
 runc version: v1.1.10-0-g18a0cb0
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
 Kernel Version: 5.15.133.1-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 15.47GiB
 Name: docker-desktop
 ID: 801d2d94-f34c-4415-9369-5760c9cc712f
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: daemon is not using the default seccomp profile

Diagnostics ID

Additional Info

Logs when locale is en:

  • com.docker.backend.exe.log
[2024-01-09T16:01:06.989259800Z][com.docker.backend.exe.wsl][I] WSL Updater: version is 2.0.14.0. an update is not required

Logs when locale differs from en:

  • com.docker.backend.exe.log
[2024-01-09T16:00:11.563871200Z][com.docker.backend.exe.wsl][I] WSL Updater: assuming wsl.exe --version not supported. checking wsl.exe --status
[2024-01-09T16:00:11.687214800Z][com.docker.backend.exe.wsl][I] WSL Updater: could not get kernel version from wsl.exe --status. assuming an update is required
[2024-01-09T16:00:11.699008100Z][com.docker.backend.exe.wsl][I] WSL Upater: install mode is set to: installLatestWsl
[2024-01-09T16:00:11.699551700Z][com.docker.backend.exe.wsl][I] WSL Updater: waiting for elevated update to complete
[2024-01-09T16:00:15.590939300Z][com.docker.backend.exe.wsl][I] WSL Updater: elevated update completed
[2024-01-09T16:00:15.884871800Z][com.docker.backend.exe.wsl][I] WSL Updater: assuming wsl.exe --version not supported. checking wsl.exe --status
[2024-01-09T16:00:16.178812500Z][com.docker.backend.exe.wsl][I] WSL Updater: could not get kernel version from wsl.exe --status. assuming an update is required
[2024-01-09T16:00:16.178812500Z][com.docker.backend.exe.wsl][I] WSL Updater: waiting for non-elevated update to complete
[2024-01-09T16:00:16.178812500Z][com.docker.backend.exe.wsl][I] WSL Updater: updating wsl with -> wsl.exe --update --web-download
[2024-01-09T16:00:16.504354700Z][com.docker.backend.exe.wsl][I] WSL Updater: update completed successfully: ��@�>�2�5�@�O�5�B�A�O�  =�0�;�8�G�8�5�  >�1�=�>�2�;�5�=�8�9�. 
 
 ��>�A�;�5�4�=�O�O�  2�5�@�A�8�O�  ?�>�4�A�8�A�B�5�<�0�  W i n d o w s   4�;�O�  L i n u x   C�6�5�  C�A�B�0�=�>�2�;�5�=�0�. 
 
 
[2024-01-09T16:00:16.504354700Z][com.docker.backend.exe.wsl][I] WSL Updater: non-elevated update completed
  • com.docker.admin.exe.log
-------------------------------------------------------------------------------->8
-------------------------------------------------------------------------------->8
[2024-01-09T16:00:14.136132400Z][com.docker.admin.exe.wsl][I] WSL Updater: updating wsl with -> wsl.exe --update --web-download
[2024-01-09T16:00:15.576283600Z][com.docker.admin.exe.wsl][I] WSL Updater: update completed successfully: ��@�>�2�5�@�O�5�B�A�O�  =�0�;�8�G�8�5�  >�1�=�>�2�;�5�=�8�9�. 
 
 ��>�A�;�5�4�=�O�O�  2�5�@�A�8�O�  ?�>�4�A�8�A�B�5�<�0�  W i n d o w s   4�;�O�  L i n u x   C�6�5�  C�A�B�0�=�>�2�;�5�=�0�. 

Activity

  1. ctalledo commented on Jan 10, 2024

    @ctalledo

    Hi @anton-filatov,

    Sorry you hit an issue, but thanks for reporting it.

    If possible, could you upload the Docker Desktop diagnostics bundle? That will provide us with even more info so we can debug.

    Thanks!

  2. lone-cat commented on Jan 23, 2024

    @lone-cat

    @anton-filatov you are the best ) nothing else helped to solve that problem so docker desktop became useless (win 11 with latest updates). Now i at least have a workaround - change locale and work. Thank you!
    And UP. For Docker desktop team: Problem is actual. We need normal solution for all locales. Docker desktop worked just fine in previous versions with any locale. But now it does not. It's a breaking change.

  3. chelnak commented on Jan 23, 2024

    @chelnak

    Hello,

    I wanted to post a quick update to say thank you for your patience and that after some investigation, we identified an issue.

    The fix will be included in the upcoming 4.27 release.

    Thanks!
    Craig 🙂

  4. lone-cat commented on Jan 23, 2024

    @lone-cat

    Great news up here. Look forward to update to 4.27 ) Thanks!!!

  5. lone-cat commented on Jan 27, 2024

    @lone-cat

    Confirm - everything works now in 4.27. Thanks!

  6. chelnak commented on Jan 28, 2024

    @chelnak

    Great news! Thank you 🙏

  7. bsousaa commented on Jan 29, 2024

    @bsousaa
    Contributor

    I'm closing the issue for now and will re-open in case this happens again. Thanks @chelnak

  8. TheSilvermind commented on Mar 1, 2024

    @TheSilvermind

    @bsousaa I also had this issue before and now I have this issue again on version 4.28.0

  9. chelnak commented on Mar 1, 2024

    @chelnak

    @TheSilvermind Would you be able to open a new ticket and provide some diagnostic logs please? 🙏

  10. 12 remaining items

  11. thedatabaseme commented on Aug 1, 2024

    @thedatabaseme

    I appears fixed after upgrade to 4.33.1 (maybe related to #14222? that's the only fix mentioned in release notes)

    For me, the issue was gone for one restart but reoccured on the second and all thereafter on v 4.33.1

  12. JohnnyDoesStuff commented on Aug 2, 2024

    @JohnnyDoesStuff

    Same issue in our case with v 4.33.1. Docker keeps trying to update wsl after a reboot. It is possible that it does not ask for permissions, but as stated by @thedatabaseme this is always only the case for a single reboot. After that reboot Docker again attempts to perform an update.

    In our case Docker tries that within a VM (long story) that does not have any internet access and therefor cannot update anything. In case of that VM, granting the permission does not seem to do anything. My Host PC runs fine and does not ask for these permissions, though which is weird.

    I've tried to tell Docker not to do any updates, but all attempts in modifying the settings.json failed so far:

    • Set disableUpdate to true
    • Set showInstallScreen to false
    • Set wslUpdateRequired to false (this will be set to true again by Docker)
    • Set wslInstallMode to an empty string or something like "none"
  13. vaibhavc2 commented on Aug 5, 2024

    @vaibhavc2

    Same issue in the latest update.... I am fed up !! Since last week, after every reboot (or startup), Docker asks for privileges to update wsl. What is this bug!

  14. andrea-reale commented on Aug 6, 2024

    @andrea-reale

    Hey all, I have shared a development build that should avoid this loop of "WSL Update required" prompts here. Feel free to try that out and report any feedback!

    (Please, also note that custom WSL2 kernels are not officially supported in Docker Desktop - some of the diagnostics shared in this and other threads point to that as a common source of the problem)

  15. theBNT commented on Aug 6, 2024

    @theBNT

    @andrea-reale while i cant try this custom build id like to say thanks for addressing this issue, hope it is solved with an official build soon.

    regarding the custom WSL2 kernels: when working with e.g. cilium it is (was?) required to enable additional modules within the kernel (see e.g. https://wsl.dev/wslcilium/), can you point into a direction of where the problems arise for docker desktop? would be a pity if its an either-or-situation.

  16. andrea-reale commented on Aug 7, 2024

    @andrea-reale

    Hey @theBNT thanks for sharing your feedback.

    It is impossible for us to support officially custom kernels, as Docker Desktop as many dependencies on kernel features and the matrix of combination is impossible to maintain.

    That said, with development build I shared above (and future Docker Desktop releases), your custom kernel will most likely continue to unofficially work, if it did in the past.

    For full openness, the source of the issue in 4.33.1 comes from the added support to the upcoming WSL2 versions (2.3.11 and above), which will ship a thin kernel with loadable modules support. Docker Desktop needs to load some of these modules at boot. Unfortunately, module loading is disabled and fails hard on WSL2 custom kernels, hence the error you were experiencing. The development build tolarates failing to modprobe kernel modules, this way you can continue using your custom kernel as long as it has the required features built-in.

  17. Shaphil commented on Aug 15, 2024

    @Shaphil

    I still have the same issue,

    Screenshot 2024-07-29 124957

    my UAC settings were always like this,

    Screenshot 2024-08-15 135447

    and with this setting, I didn't have this problem before.

    It suddenly appeared, probably after a Windows update, and is still there.

    Has there been any progress on this?

  18. andrea-reale commented on Aug 20, 2024

    @andrea-reale

    Hi @Shaphil , have you tried the build I shared above in this thread?
    If you still have problems, please upload your diagnostics and share your ID and we'll try to help!

  19. Shaphil commented on Aug 20, 2024

    @Shaphil

    Hi @Shaphil , have you tried the build I shared above in this thread? If you still have problems, please upload your diagnostics and share your ID and we'll try to help!

    Yes, I just did, but it failed like this #13806 (comment)

    So I reverted to v4.32 like you suggested (#13806 (comment)) and now everything's ok. I will be waiting for Docker Desktop 4.34.

  20. pawelel commented on Aug 22, 2024

    @pawelel

    Hi, just set C:\Program Files\Docker\Docker\resources\com.docker.admin.exe to 'Run as admin'. The UAC prompt no longer appears. Worked only with logout, not reboot ;/

  21. TheMasterPrawn commented on Aug 22, 2024

    @TheMasterPrawn

    I cant believe this has been around since Jan 9th and there have been numerous promises that it has been fixed in version x.xxx.xxx. I have an environment where I have software that requires interaction to allow elevation. I am evaluating docker to provide packaged environments to dev and support teams for product and api work. This has been a blocker for me for weeks now. Software should not be trying to update a windows component on startup. If there is a problem, or it needs a version to function it should tell you and then its up to the individual/I.T team to fix.

  22. christiandavilakoobin commented on Aug 30, 2024

    @christiandavilakoobin

    Software should not be trying to update a windows component on startup. If there is a problem, or it needs a version to function it should tell you and then its up to the individual/I.T team to fix.

    Totally agree. It's not only WSL, but any windows component. There are more apps which may depend on that version, and docker can potentially destroy that.

  23. lorenrh commented on Aug 30, 2024

    @lorenrh
    Member

    4.34.0 has been released with a fix for this issue, more information o the release notes.

    I'll be closing this issue, but if the problem persists please open a fresh issue!

  24. minhtan143 commented on Sep 26, 2024

    @minhtan143

    I had an problem in version 4.33.1, fixed when upgrading to 4.34.2.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions