You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has been an issue foryears but a recent change broke the workaround.
The issue is that docker puts the wrong IP address in the hosts file every time it starts. The correct IP address is 127.0.0.1 but instead docker puts 192.168.178.x or whatever your local IP address is.
The workaround is to make your hosts-file read only so docker can't overwrite it. For a while that was fine, then Docker began to complain that it can't start Hyper-V because it can't edit the hosts file. Manually clicking 'Restart' would still start the Hyper-V. That doesn't work anymore in the the most recent version of Docker. Hyper-V will not start unless it has write-access to the hosts file, and then it butchers the file and you have to manually fix it every time :sadface:
Description
This has been an issue for years but a recent change broke the workaround.
The issue is that docker puts the wrong IP address in the hosts file every time it starts. The correct IP address is
127.0.0.1
but instead docker puts192.168.178.x
or whatever your local IP address is.The workaround is to make your hosts-file read only so docker can't overwrite it. For a while that was fine, then Docker began to complain that it can't start Hyper-V because it can't edit the hosts file. Manually clicking 'Restart' would still start the Hyper-V. That doesn't work anymore in the the most recent version of Docker. Hyper-V will not start unless it has write-access to the hosts file, and then it butchers the file and you have to manually fix it every time :sadface:
Reproduce
Expected behavior
Docker leaves lines
in your hosts file intact.
docker version
Client: Version: 27.5.1 API version: 1.47 Go version: go1.22.11 Git commit: 9f9e405 Built: Wed Jan 22 13:41:44 2025 OS/Arch: windows/amd64 Context: desktop-linux Server: Docker Desktop 4.38.0 (181591) Engine: Version: 27.5.1 API version: 1.47 (minimum version 1.24) Go version: go1.22.11 Git commit: 4c9b3b0 Built: Wed Jan 22 13:41:17 2025 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.25 GitCommit: bcc810d6b9066471b0b6fa75f557a15a1cbf31bb runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e946 docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Diagnostics ID
?
Additional Info
No response
The text was updated successfully, but these errors were encountered: