Hosts file not updated after upgrading to 4.18.0
- [x] I have tried with the latest version of Docker Desktop
- [x] I have tried disabling enabled experimental features
- [x] I have uploaded Diagnostics
- Diagnostics ID: 9E315686-3CD1-4F60-AF3C-D4F82F0367FC/20230412144224
Actual behavior
The hosts file located at C:\Windows\System32\drivers\etc\hosts is not updated with mappings to host.docker.internal nor gateway.docker.internal
Expected behavior
The hosts file to be updated with host.docker.internal and gateway.docker.internal mappings
Information
-
Is it reproducible? I've upgraded to 4.18.0 on two separate systems and the result is the same for both
-
Is the problem new? As far as I'm aware
-
Did the problem appear with an update? Yes, since upgrading to 4.18.0
-
Windows Version: 10.0.19044.2846
-
Docker Desktop Version: 4.18.0
-
WSL2 or Hyper-V backend? WSL2
-
Are you running inside a virtualized Windows e.g. on a cloud server or a VM: No, standard windows desktop
Output of & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check
I've attached two examples as I'm not sure whether the com.docker.service needs to be running. The following from the release notes of 4.18.0 suggests not, but without this the number of errors I see from the diagnostics increases quite a bit:
"Docker Desktop with the WSL backend no longer requires the com.docker.service privileged service to run permanently. For more information see Permission requirements for Windows."
Here is the output with com.docker.service running
[2023-04-12T14:56:10.950564100Z][com.docker.diagnose.exe][I] set path configuration to OnHost Starting diagnostics
[PASS] DD0027: is there available disk space on the host? [PASS] DD0028: is there available VM disk space? [PASS] DD0002: does the bootloader have virtualization enabled? [SKIP] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled? [PASS] DD0021: is the WSL 2 Windows Feature enabled? [PASS] DD0024: is WSL installed? [PASS] DD0025: are WSL distros installed? [PASS] DD0026: is the WSL LxssManager service running? [FAIL] DD0029: is the WSL 2 Linux filesystem corrupt? [ 1320.881813] EXT4-fs error (device sdc): ext4_put_super:1188: comm wsl-bootstrap: Couldn't clean up the journal [FAIL] DD0035: is the VM time synchronized? parsing time output: 2023-04-12T14:56:14+00:00: parsing time "2023-04-12T14:56:14+00:00" as "2006-01-02T15:04:05UTC": cannot parse "+00:00" as "UTC" [PASS] DD0017: can a VM be started? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0004: is the Docker engine running? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0031: does the Docker API work? [PASS] DD0013: is the $PATH ok? [PASS] DD0003: is the Docker CLI working? [PASS] DD0005: is the user in the docker-users group? [PASS] DD0038: is the connection to Docker working? [PASS] DD0014: are the backend processes running? [PASS] DD0007: is the backend responding? [PASS] DD0008: is the native API responding? [PASS] DD0009: is the vpnkit API responding? [PASS] DD0010: is the Docker API proxy responding? [PASS] DD0006: is the Docker Desktop Service responding? [SKIP] DD0030: is the image access management authorized? [PASS] DD0033: does the host have Internet access? [PASS] DD0002: does the bootloader have virtualization enabled? [PASS] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled? [PASS] DD0021: is the WSL 2 Windows Feature enabled? [PASS] DD0024: is WSL installed? [PASS] DD0025: are WSL distros installed? [PASS] DD0026: is the WSL LxssManager service running? [WARN] DD0029: is the WSL 2 Linux filesystem corrupt? [ 1320.881813] EXT4-fs error (device sdc): ext4_put_super:1188: comm wsl-bootstrap: Couldn't clean up the journal [WARN] DD0035: is the VM time synchronized? parsing time output: 2023-04-12T14:56:14+00:00: parsing time "2023-04-12T14:56:14+00:00" as "2006-01-02T15:04:05UTC": cannot parse "+00:00" as "UTC" [PASS] DD0017: can a VM be started? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0004: is the Docker engine running? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0031: does the Docker API work? [PASS] DD0032: do Docker networks overlap with host IPs?
Please note the following 2 warnings:
1 : The check: is the WSL 2 Linux filesystem corrupt? Produced the following warning: [ 1320.881813] EXT4-fs error (device sdc): ext4_put_super:1188: comm wsl-bootstrap: Couldn't clean up the journal
If the WSL 2 Linux filesystem is corrupt then Docker Desktop cannot start. There is a known issue fixed in Windows Insider builds which can cause filesystem corruption, see: https://github.com/microsoft/WSL/issues/5895 .
Try running "wsl --shutdown" to stop your WSL Virtual Machine. When it restarts it will run a filesystem check and hopefully fix the problem.
2 : The check: is the VM time synchronized? Produced the following warning: parsing time output: 2023-04-12T14:56:14+00:00: parsing time "2023-04-12T14:56:14+00:00" as "2006-01-02T15:04:05UTC": cannot parse "+00:00" as "UTC"
The VM time must be in sync with the host, otherwise Docker Desktop will not work correctly.
Ensure you are using a modern WSL 2 kernel (see "wsl --update"). If this problem persists, try manually synchronizing the VM clock with "sudo hwclock -s".
Please investigate the following 2 issues:
1 : The test: is the WSL 2 Linux filesystem corrupt? Failed with: [ 1320.881813] EXT4-fs error (device sdc): ext4_put_super:1188: comm wsl-bootstrap: Couldn't clean up the journal
If the WSL 2 Linux filesystem is corrupt then Docker Desktop cannot start. There is a known issue fixed in Windows Insider builds which can cause filesystem corruption, see: https://github.com/microsoft/WSL/issues/5895 .
Try running "wsl --shutdown" to stop your WSL Virtual Machine. When it restarts it will run a filesystem check and hopefully fix the problem.
2 : The test: is the VM time synchronized? Failed with: parsing time output: 2023-04-12T14:56:14+00:00: parsing time "2023-04-12T14:56:14+00:00" as "2006-01-02T15:04:05UTC": cannot parse "+00:00" as "UTC"
The VM time must be in sync with the host, otherwise Docker Desktop will not work correctly.
Ensure you are using a modern WSL 2 kernel (see "wsl --update"). If this problem persists, try manually synchronizing the VM clock with "sudo hwclock -s".
And here it is without this service running:
[2023-04-12T14:57:36.572633300Z][com.docker.diagnose.exe][I] set path configuration to OnHost Starting diagnostics [PASS] DD0027: is there available disk space on the host? [PASS] DD0028: is there available VM disk space? [FAIL] DD0002: does the bootloader have virtualization enabled? contacting Windows service: Get "http://ipc/hyperv/bootloader": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:38.520535300Z][com.docker.diagnose.exe][I] ipc.NewClient: ad3d5332-com.docker.diagnose -> \.\pipe\dockerBackendV2 com.docker.service [2023-04-12T14:57:38.520535300Z][com.docker.diagnose.exe][I] (5c2148e4) ad3d5332-com.docker.diagnose C->S com.docker.service GET /hyperv/bootloader [2023-04-12T14:57:38.521156100Z][com.docker.diagnose.exe][W] (5c2148e4) ad3d5332-com.docker.diagnose C<-S NoResponse GET /hyperv/bootloader (620.8µs): Get "http://ipc/hyperv/bootloader": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:38.521156100Z][com.docker.diagnose.exe][I] (5c2148e4-1) ad3d5332-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:38.521746000Z][com.docker.diagnose.exe][W] (5c2148e4-1) ad3d5332-com.docker.diagnose C<-S NoResponse GET /ping (589.9µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:39.530335200Z][com.docker.diagnose.exe][I] (5c2148e4-2) ad3d5332-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:39.531585500Z][com.docker.diagnose.exe][W] (5c2148e4-2) ad3d5332-com.docker.diagnose C<-S NoResponse GET /ping (1.3112ms): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:40.542721300Z][com.docker.diagnose.exe][I] (5c2148e4-3) ad3d5332-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:40.543694500Z][com.docker.diagnose.exe][W] (5c2148e4-3) ad3d5332-com.docker.diagnose C<-S NoResponse GET /ping (973.2µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:41.558592600Z][com.docker.diagnose.exe][I] (5c2148e4-4) ad3d5332-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:41.559435200Z][com.docker.diagnose.exe][W] (5c2148e4-4) ad3d5332-com.docker.diagnose C<-S NoResponse GET /ping (842.6µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:42.572163600Z][com.docker.diagnose.exe][I] (5c2148e4-5) ad3d5332-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:42.573781000Z][com.docker.diagnose.exe][W] (5c2148e4-5) ad3d5332-com.docker.diagnose C<-S NoResponse GET /ping (1.6174ms): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:43.586335100Z][com.docker.diagnose.exe][I] (5c2148e4-6) ad3d5332-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:43.587341100Z][com.docker.diagnose.exe][W] (5c2148e4-6) ad3d5332-com.docker.diagnose C<-S NoResponse GET /ping (1.006ms): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:44.600681200Z][com.docker.diagnose.exe][I] (5c2148e4-7) ad3d5332-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:44.602191300Z][com.docker.diagnose.exe][W] (5c2148e4-7) ad3d5332-com.docker.diagnose C<-S NoResponse GET /ping (1.5101ms): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:45.612297600Z][com.docker.diagnose.exe][I] (5c2148e4-8) ad3d5332-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:45.613808100Z][com.docker.diagnose.exe][W] (5c2148e4-8) ad3d5332-com.docker.diagnose C<-S NoResponse GET /ping (1.0589ms): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
[SKIP] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [FAIL] DD0022: is the Virtual Machine Platform Windows Feature enabled? querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:45.631859100Z][com.docker.diagnose.exe][I] ipc.NewClient: 0aae7359-com.docker.diagnose -> \.\pipe\dockerBackendV2 com.docker.service [2023-04-12T14:57:45.632415200Z][com.docker.diagnose.exe][I] (c2a1615a) 0aae7359-com.docker.diagnose C->S com.docker.service POST /windowsfeatures/check: [VirtualMachinePlatform (Virtual Machine Platform)] [2023-04-12T14:57:45.632793000Z][com.docker.diagnose.exe][W] (c2a1615a) 0aae7359-com.docker.diagnose C<-S NoResponse POST /windowsfeatures/check (438.7µs): Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:45.633037100Z][com.docker.diagnose.exe][I] (c2a1615a-1) 0aae7359-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:45.633377100Z][com.docker.diagnose.exe][W] (c2a1615a-1) 0aae7359-com.docker.diagnose C<-S NoResponse GET /ping (340µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:46.638868000Z][com.docker.diagnose.exe][I] (c2a1615a-2) 0aae7359-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:46.639705700Z][com.docker.diagnose.exe][W] (c2a1615a-2) 0aae7359-com.docker.diagnose C<-S NoResponse GET /ping (837.7µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:47.641669100Z][com.docker.diagnose.exe][I] (c2a1615a-3) 0aae7359-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:47.642542400Z][com.docker.diagnose.exe][W] (c2a1615a-3) 0aae7359-com.docker.diagnose C<-S NoResponse GET /ping (873.3µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:48.650984000Z][com.docker.diagnose.exe][I] (c2a1615a-4) 0aae7359-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:48.651829100Z][com.docker.diagnose.exe][W] (c2a1615a-4) 0aae7359-com.docker.diagnose C<-S NoResponse GET /ping (845.1µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:49.664498300Z][com.docker.diagnose.exe][I] (c2a1615a-5) 0aae7359-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:49.666298800Z][com.docker.diagnose.exe][W] (c2a1615a-5) 0aae7359-com.docker.diagnose C<-S NoResponse GET /ping (1.7158ms): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:50.678921400Z][com.docker.diagnose.exe][I] (c2a1615a-6) 0aae7359-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:50.681884900Z][com.docker.diagnose.exe][W] (c2a1615a-6) 0aae7359-com.docker.diagnose C<-S NoResponse GET /ping (2.9635ms): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:51.689423000Z][com.docker.diagnose.exe][I] (c2a1615a-7) 0aae7359-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:51.689930700Z][com.docker.diagnose.exe][W] (c2a1615a-7) 0aae7359-com.docker.diagnose C<-S NoResponse GET /ping (507.7µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:52.702930800Z][com.docker.diagnose.exe][I] (c2a1615a-8) 0aae7359-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:52.703641200Z][com.docker.diagnose.exe][W] (c2a1615a-8) 0aae7359-com.docker.diagnose C<-S NoResponse GET /ping (710.4µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
[FAIL] DD0021: is the WSL 2 Windows Feature enabled? querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:52.708830500Z][com.docker.diagnose.exe][I] ipc.NewClient: 0d010a32-com.docker.diagnose -> \.\pipe\dockerBackendV2 com.docker.service [2023-04-12T14:57:52.709829700Z][com.docker.diagnose.exe][I] (9700a24f) 0d010a32-com.docker.diagnose C->S com.docker.service POST /windowsfeatures/check: [Microsoft-Windows-Subsystem-Linux (Windows Subsystem for Linux)] [2023-04-12T14:57:52.709829700Z][com.docker.diagnose.exe][W] (9700a24f) 0d010a32-com.docker.diagnose C<-S NoResponse POST /windowsfeatures/check (0s): Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:52.709829700Z][com.docker.diagnose.exe][I] (9700a24f-1) 0d010a32-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:52.709829700Z][com.docker.diagnose.exe][W] (9700a24f-1) 0d010a32-com.docker.diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:53.713218500Z][com.docker.diagnose.exe][I] (9700a24f-2) 0d010a32-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:53.713947000Z][com.docker.diagnose.exe][W] (9700a24f-2) 0d010a32-com.docker.diagnose C<-S NoResponse GET /ping (728.5µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:54.719776200Z][com.docker.diagnose.exe][I] (9700a24f-3) 0d010a32-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:54.720322000Z][com.docker.diagnose.exe][W] (9700a24f-3) 0d010a32-com.docker.diagnose C<-S NoResponse GET /ping (545.8µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:55.733344600Z][com.docker.diagnose.exe][I] (9700a24f-4) 0d010a32-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:55.733707100Z][com.docker.diagnose.exe][W] (9700a24f-4) 0d010a32-com.docker.diagnose C<-S NoResponse GET /ping (362.5µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:56.746763500Z][com.docker.diagnose.exe][I] (9700a24f-5) 0d010a32-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:56.748250500Z][com.docker.diagnose.exe][W] (9700a24f-5) 0d010a32-com.docker.diagnose C<-S NoResponse GET /ping (1.487ms): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:57.761119600Z][com.docker.diagnose.exe][I] (9700a24f-6) 0d010a32-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:57.762040600Z][com.docker.diagnose.exe][W] (9700a24f-6) 0d010a32-com.docker.diagnose C<-S NoResponse GET /ping (921µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:58.769580600Z][com.docker.diagnose.exe][I] (9700a24f-7) 0d010a32-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:58.770225200Z][com.docker.diagnose.exe][W] (9700a24f-7) 0d010a32-com.docker.diagnose C<-S NoResponse GET /ping (887.9µs): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:57:59.780990200Z][com.docker.diagnose.exe][I] (9700a24f-8) 0d010a32-com.docker.diagnose C->S com.docker.service GET /ping [2023-04-12T14:57:59.783540600Z][com.docker.diagnose.exe][W] (9700a24f-8) 0d010a32-com.docker.diagnose C<-S NoResponse GET /ping (2.5504ms): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
[PASS] DD0024: is WSL installed? [PASS] DD0025: are WSL distros installed? [PASS] DD0026: is the WSL LxssManager service running? [FAIL] DD0029: is the WSL 2 Linux filesystem corrupt? [ 1320.881813] EXT4-fs error (device sdc): ext4_put_super:1188: comm wsl-bootstrap: Couldn't clean up the journal [FAIL] DD0035: is the VM time synchronized? parsing time output: 2023-04-12T14:58:00+00:00: parsing time "2023-04-12T14:58:00+00:00" as "2006-01-02T15:04:05UTC": cannot parse "+00:00" as "UTC" [PASS] DD0017: can a VM be started? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0004: is the Docker engine running? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0031: does the Docker API work? [PASS] DD0013: is the $PATH ok? [PASS] DD0003: is the Docker CLI working? [PASS] DD0005: is the user in the docker-users group? [PASS] DD0038: is the connection to Docker working? [PASS] DD0014: are the backend processes running? [PASS] DD0007: is the backend responding? [PASS] DD0008: is the native API responding? [PASS] DD0009: is the vpnkit API responding? [PASS] DD0010: is the Docker API proxy responding? [FAIL] DD0006: is the Docker Desktop Service responding? failed to ping com.docker.service with error: Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [2023-04-12T14:58:02.617320300Z][com.docker.diagnose.exe][I] ipc.NewClient: c3f47630-diagnose -> \.\pipe\dockerBackendV2 Service [2023-04-12T14:58:02.617819800Z][com.docker.diagnose.exe][I] (0b368d7e) c3f47630-diagnose C->S Service GET /ping [2023-04-12T14:58:02.617819800Z][com.docker.diagnose.exe][W] (0b368d7e) c3f47630-diagnose C<-S NoResponse GET /ping (0s): Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
[SKIP] DD0030: is the image access management authorized? [PASS] DD0033: does the host have Internet access? [WARN] DD0002: does the bootloader have virtualization enabled? contacting Windows service: Get "http://ipc/hyperv/bootloader": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [PASS] DD0018: does the host support virtualization? [PASS] DD0001: is the application running? [WARN] DD0022: is the Virtual Machine Platform Windows Feature enabled? querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [WARN] DD0021: is the WSL 2 Windows Feature enabled? querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified. [PASS] DD0024: is WSL installed? [PASS] DD0025: are WSL distros installed? [PASS] DD0026: is the WSL LxssManager service running? [WARN] DD0029: is the WSL 2 Linux filesystem corrupt? [ 1320.881813] EXT4-fs error (device sdc): ext4_put_super:1188: comm wsl-bootstrap: Couldn't clean up the journal [WARN] DD0035: is the VM time synchronized? parsing time output: 2023-04-12T14:58:00+00:00: parsing time "2023-04-12T14:58:00+00:00" as "2006-01-02T15:04:05UTC": cannot parse "+00:00" as "UTC" [PASS] DD0017: can a VM be started? [PASS] DD0016: is the LinuxKit VM running? [PASS] DD0011: are the LinuxKit services running? [PASS] DD0004: is the Docker engine running? [PASS] DD0015: are the binary symlinks installed? [PASS] DD0031: does the Docker API work? [PASS] DD0032: do Docker networks overlap with host IPs?
Please note the following 24 warnings:
1 : The check: does the bootloader have virtualization enabled? Produced the following warning: contacting Windows service: Get "http://ipc/hyperv/bootloader": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Docker engine runs inside a Linux VM. Therefore Windows must boot with the Microsoft Hypervisor enabled. Run: bcdedit /set hypervisorlaunchtype auto
2 : The check: does the bootloader have virtualization enabled? Produced the following warning: contacting Windows service: Get "http://ipc/hyperv/bootloader": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Docker engine runs inside a Linux VM. Therefore Windows must boot with the Microsoft Hypervisor enabled. Run: bcdedit /set hypervisorlaunchtype auto
3 : The check: is the Virtual Machine Platform Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Virtual Machine Platform Windows Feature is needed to use WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
4 : The check: is the WSL 2 Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Microsoft-Windows-Subsystem-Linux Windows Feature is needed to run containers in WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
5 : The check: is the Virtual Machine Platform Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Virtual Machine Platform Windows Feature is needed to use WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
6 : The check: is the WSL 2 Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Microsoft-Windows-Subsystem-Linux Windows Feature is needed to run containers in WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
7 : The check: is the Virtual Machine Platform Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Virtual Machine Platform Windows Feature is needed to use WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
8 : The check: is the WSL 2 Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Microsoft-Windows-Subsystem-Linux Windows Feature is needed to run containers in WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
9 : The check: is the Virtual Machine Platform Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Virtual Machine Platform Windows Feature is needed to use WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
10 : The check: is the WSL 2 Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Microsoft-Windows-Subsystem-Linux Windows Feature is needed to run containers in WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
11 : The check: is the Virtual Machine Platform Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Virtual Machine Platform Windows Feature is needed to use WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
12 : The check: is the WSL 2 Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Microsoft-Windows-Subsystem-Linux Windows Feature is needed to run containers in WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
13 : The check: is the Virtual Machine Platform Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Virtual Machine Platform Windows Feature is needed to use WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
14 : The check: is the WSL 2 Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Microsoft-Windows-Subsystem-Linux Windows Feature is needed to run containers in WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
15 : The check: is the WSL 2 Linux filesystem corrupt? Produced the following warning: [ 1320.881813] EXT4-fs error (device sdc): ext4_put_super:1188: comm wsl-bootstrap: Couldn't clean up the journal
If the WSL 2 Linux filesystem is corrupt then Docker Desktop cannot start. There is a known issue fixed in Windows Insider builds which can cause filesystem corruption, see: https://github.com/microsoft/WSL/issues/5895 .
Try running "wsl --shutdown" to stop your WSL Virtual Machine. When it restarts it will run a filesystem check and hopefully fix the problem.
16 : The check: is the Virtual Machine Platform Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Virtual Machine Platform Windows Feature is needed to use WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
17 : The check: is the WSL 2 Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Microsoft-Windows-Subsystem-Linux Windows Feature is needed to run containers in WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
18 : The check: is the Virtual Machine Platform Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Virtual Machine Platform Windows Feature is needed to use WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
19 : The check: is the WSL 2 Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Microsoft-Windows-Subsystem-Linux Windows Feature is needed to run containers in WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
20 : The check: is the Virtual Machine Platform Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Virtual Machine Platform Windows Feature is needed to use WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
21 : The check: is the WSL 2 Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Microsoft-Windows-Subsystem-Linux Windows Feature is needed to run containers in WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
22 : The check: is the Virtual Machine Platform Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Virtual Machine Platform Windows Feature is needed to use WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
23 : The check: is the WSL 2 Windows Feature enabled? Produced the following warning: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Microsoft-Windows-Subsystem-Linux Windows Feature is needed to run containers in WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
24 : The check: is the VM time synchronized? Produced the following warning: parsing time output: 2023-04-12T14:58:00+00:00: parsing time "2023-04-12T14:58:00+00:00" as "2006-01-02T15:04:05UTC": cannot parse "+00:00" as "UTC"
The VM time must be in sync with the host, otherwise Docker Desktop will not work correctly.
Ensure you are using a modern WSL 2 kernel (see "wsl --update"). If this problem persists, try manually synchronizing the VM clock with "sudo hwclock -s".
Please investigate the following 3 issues:
1 : The test: does the bootloader have virtualization enabled? Failed with: contacting Windows service: Get "http://ipc/hyperv/bootloader": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Docker engine runs inside a Linux VM. Therefore Windows must boot with the Microsoft Hypervisor enabled. Run: bcdedit /set hypervisorlaunchtype auto
2 : The test: is the Virtual Machine Platform Windows Feature enabled? Failed with: querying windows features: Post "http://ipc/windowsfeatures/check": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Virtual Machine Platform Windows Feature is needed to use WSL 2. See https://docs.microsoft.com/en-us/windows/wsl/install-win10
3 : The test: is the Docker Desktop Service responding? Failed with: failed to ping com.docker.service with error: Get "http://ipc/ping": open \.\pipe\dockerBackendV2: The system cannot find the file specified.
The Docker Desktop Service is needed to start the Docker engine. Open the list of Services and configure the Docker Desktop Service to start automatically.
I have the same problem since I've upgraded to 4.18. A temporary fix I'm using to be able to use host.docker.internal is to add it to the host file manually and use the IP address of one of my network adapters.
Be aware, you should not use localhost or 127.0.0.1 but you actually need an assigned IP address to the adapter For example: 192.168.x.x host.docker.internal
I've noticed you should restart the docker engine for the changes to take effect.
Good to hear I'm not the only one.
The temporary fix you suggest does work, but my current working situation prevents me from having a static IP address so it is somewhat annoying to have to constantly reconfigure this.
Same issue here.
Our use case was we used the entry of host.docker.internal in the hosts file to get the IP address of Docker Desktop so we could create other hosts file entries that also point to the same IP address. This no longer works after upgrading to 4.18.0.
related:
- #13398
Hi,
Could you please clarify whether you need to resolve host.docker.internal from a container only? Or you need to resolve it from the host itself too?
In my current use case I am using from both within a container and from the host too. However, not having it from within a container is causing me most issues at the moment
Hi, Could you please clarify whether you need to resolve
host.docker.internalfrom a container only? Or you need to resolve it from the host itself too?
We don't need it to resolve from the host, but we were using its presence in the hosts file to get the IP address that was then used to create other hosts entries. Without it we don't know a way to get an IP address we can put in the hosts file that can resolve from both the host and the container.
@hoachin could you please explain why you need to resolve it from the host? Why not resolve localhost for example?
The only case where it is needed to resolve indistinctly on the host and the container is if you are running some software in both environments, and they share a common configuration that references host.docker.internal. Is that you case, or do you have another case that requires that?
@chandlerkent I understand you just read the hosts file on the host to find your local IP, and then you duplicate the entry with other names. I guess you create the other names in the container hosts, right? As you don't resolve from the host, would it be OK if you knew your host IP from some other mean?
We use host.docker.internal both internally and externally to simplify configuration. Not all services can handle multiple host names and/or certificates.
When using same name it doesn’t matter if the service is running inside or outside Docker for example when debugging.
@elapuyade We do actually resolve this IP address from the host as well. Maybe a more concrete example would help (and totally open to a better solution to this problem!).
We have all development machines running Windows. We have various HTTP services, some of which run on linux inside containers in Docker Desktop for Windows and some of which run on the host running in IIS. These HTTP services are all fronted by "nice" hostnames we use for testing (like example1.localhost.test and example2.localhost.test). All of these "nice" hostnames may be resolved from either the containers or the host. It is important both containers and host services communicate over these "nice" hostnames (instead of using host.docker.internal for example). They all resolve to the same IP address regardless of if they are from the host or the container (these are actually all fronted by the same reverse proxy that provides HTTPS and routing which runs on a container inside Docker Desktop).
So to solve this problem we have been using the existing IP address for host.docker.internal and then creating these other "nice" hostnames on the host's hosts file to resolve to the same IP address. Without having this IP address, we are unable to find a single IP address that works for both the containers and the host machine.
Our current workaround is to actually have two separate IPs. For the host machine, we just create all these "nice" hostnames to point to 127.0.0.1. Then we use the extra_hosts feature of docker compose to point to the same "nice" hostnames to a different IP which we get by running a container which resolves host.docker.internal so we know the IP address of the host machine from the container's perspective (docker run -it --rm --name resolve_hostdockerinternal tutum/dnsutils dig +short host.docker.internal). The issue with this workaround is we have to update all of our services to have this extra_hosts which while doable is more configuration than was previously needed.
I hope that long explanation is useful!
We use host.docker.internal to reference other services whether they are running inside a container or not. Our sql servers are running on the machines and we connect to them from within the container. The other way around we connect from the applications, could be running in a container or could be running on the machine, to a RabbitMQ container.
These situations change depending on the needs during development. A developer could run everything in docker except for the sql server and the service being developed on.
Using host.docker.internal would both resolve services running directly on the machine and services running in a container when they are correctly mapped.
Currently this only works if we manually add the NAT ip adress into the host file.
Thanks all for your explanations. We are looking into it and will try to get those names back into the hosts file in next version.
When can we expect the next version? I just upgraded to 4.18 as well and everything stopped working because multiple compose services rely on the host.docker.internal to operate.
version 4.19 is scheduled to be released by the end on the month, so pretty soon.
Closing this issue because a fix has been released in Docker Desktop 4.19.0. See the release notes for more details.
The same thing is happening for Linux (not on Docker Desktop)... "Could not resolve host: host.docker.internal"
Docker version 23.0.5, build bc4487a Docker Compose version v2.17.3
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
/lifecycle locked