docker-compose build on Windows fails with stacktrace if API version < 1.24
See original comment: https://github.com/docker/compose/issues/4106#issuecomment-266105765
Tried work arround by EdwinJunior
Met this issue. Get fixed with https://github.com/docker/for-win/issues/711 net stop hns; del c:\programdata\Microsoft\windows\NHS\HNS.data Remove-Netnat; net start hns; and restart docker for windows with administrator permission.
(not sure what running docker as administrator really means as the service is running as the local system?)
Now I get this error when starting docker
Docker daemon failed with message: Error starting daemon: Error initializing network controller: Error creating default network: HNS failed with error : {Object Exists} An attempt was made to create an object and the object name already existed.
at Docker.Backend.ContainerEngine.Windows.DoStart(Settings settings)
at Docker.Backend.ContainerEngine.Windows.Restart(Settings settings)
at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass9_0.
Have done a reset to factory defaults and docker starts but back to the original issue!
Severity Code Description Project File Line Suppression State Error MSB4018 The "PrepareForLaunch" task failed unexpectedly. Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose2647930274_default" with the default driver HNS failed with error : The parameter is incorrect. .
For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose2647930274_default" with the default driver
HNS failed with error : The parameter is incorrect.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerComposeClient.