Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Building with Docker Desktop 4 on Windows does not work #1425

Open
dblock opened this issue Oct 22, 2021 · 4 comments
Open

[BUG] Building with Docker Desktop 4 on Windows does not work #1425

dblock opened this issue Oct 22, 2021 · 4 comments
Labels
bug Something isn't working Build Libraries & Interfaces Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. Priority-Medium windows

Comments

@dblock
Copy link
Member

dblock commented Oct 22, 2021

Describe the bug

Building with Docker Desktop 4 for Windows does not work.

Exit-code 1 when calling C:\Program Files\Docker\Docker\resources\bin\docker-compose.exe, stdout: Sending build context to Docker daemon   28.6MB
$ docker-compose -f ./test/fixtures/azure-fixture/docker-compose.yml up
Building azure-fixture
Sending build context to Docker daemon   28.6MB
Step 1/5 : FROM ubuntu:18.04
18.04: Pulling from library/ubuntu
no matching manifest for windows/amd64 10.0.17763 in the manifest list entries
Service 'azure-fixture' failed to build : Build failed

To Reproduce
Steps to reproduce the behavior:

  1. Download and install Docker Desktop for Windows from https://docs.docker.com/install/.
  2. Keep Enable Hyper-V Windows Features during installation checked, restart.
  3. Run "C:\Program Files\Docker\Docker\DockerCli.exe" -SwitchDaemon once to fix the In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect. error.
  4. Open Docker Desktop, once, review and accept license agreement, and ensure that the Docker daemon is running.
  5. Run docker-compose disable-v2 once to work around a "not implemented" error.
  6. Run ./gradlew build
* What went wrong:
Execution failed for task ':test:fixtures:azure-fixture:composeUp'.
> Exit-code 1 when calling C:\Program Files\Docker\Docker\resources\bin\docker-compose.exe, stdout: Sending build context to Docker daemon   28.6MB

  Step 1/5 : FROM ubuntu:18.04
  18.04: Pulling from library/ubuntu

Suggested workarounds in this SO aren't helpful.

Note that in addition to these problems, if you're running Docker desktop on EC2, you will need a C5 instance. Unlike other instances those aren’t passing through VT-x CPU extensions, so it will be able to run Windows Docker containers, but not Linux.

Expected behavior

Build to work.

Host/Environment (please complete the following information):

Windows Server 2019 10.0 (amd64)
JDK 11 (jdk-11.0.12.7-hotspot)
Docker version 20.10.8, build 3967b7d
Docker Desktop 4.1.1 (69879)

Additional context
Coming from #1379.

@dblock dblock added bug Something isn't working untriaged windows labels Oct 22, 2021
@reta reta mentioned this issue Oct 22, 2021
1 task
@dblock
Copy link
Member Author

dblock commented Oct 22, 2021

In my case trying to downgrade to 3.6 didn't work. After futsing around the thing installing 4.1.1 doesn't work either.

System.InvalidOperationException:
job failed with message: 'DockerDesktopVM' failed to start. (Virtual machine ID F4BE826B-0F00-4D00-BCD9-B669A1360B06)

The Virtual Machine Management Service failed to start the virtual machine 'DockerDesktopVM' because one of the Hyper-V components is not running (Virtual machine ID F4BE826B-0F00-4D00-BCD9-B669A1360B06).
   at Docker.Backend.HyperVInfrastructure.HandleUpdatedJob(CIMConcreteJob updatedJob) in C:\workspaces\PR-16599\src\github.com\docker\pinata\win\src\Docker.Backend\HyperV\HyperVInfrastructure.cs:line 770
   at Docker.Backend.HyperVInfrastructure.<HandleMaybeAsyncJob>d__39.MoveNext() in C:\workspaces\PR-16599\src\github.com\docker\pinata\win\src\Docker.Backend\HyperV\HyperVInfrastructure.cs:line 704
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Docker.Backend.HyperVInfrastructure.<StartVMAsync>d__31.MoveNext() in C:\workspaces\PR-16599\src\github.com\docker\pinata\win\src\Docker.Backend\HyperV\HyperVInfrastructure.cs:line 552
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Backend.HyperV.<StartAsync>d__6.MoveNext() in C:\workspaces\PR-16599\src\github.com\docker\pinata\win\src\Docker.Backend\HyperV\HyperV.cs:line 105
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Backend.HttpAPI.HyperVController.<StartAsync>d__7.MoveNext() in C:\workspaces\PR-16599\src\github.com\docker\pinata\win\src\Docker.Backend\HttpAPI\HyperVController.cs:line 43
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()

Hyper-V seems OK, tried uninstalling and reinstalling that too. None of the solutions below worked.

https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
https://stackoverflow.com/questions/48255871/failed-to-start-the-virtual-machine-mobylinuxvm-because-one-of-the-hyper-v-com

@minalsha
Copy link
Contributor

@dblock we do not support Windows yet. Can this be labelled as enhancement instead of bug?

@dblock
Copy link
Member Author

dblock commented Sep 6, 2022

@dblock we do not support Windows yet. Can this be labelled as enhancement instead of bug?

🤷 it's a bug somewhere

@minalsha
Copy link
Contributor

@peterzhuamazon is this an open issue?

@peterzhuamazon peterzhuamazon added the Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Build Libraries & Interfaces Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. Priority-Medium windows
Projects
None yet
Development

No branches or pull requests

4 participants