Docker error: CTC1014 Docker command failed with exit code 1.

If you are facing the issue with the following error:

CTC1014	Docker command failed with exit code 1.
The command 'cmd /S /C dotnet restore "projectname.csproj"' returned a non-zero code: 1

Ensure that you have selected Debug mode instead of Release.

This content has 3 years. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.

Docker error: CTC1015 Docker command failed with exit code 125.

If the Visual Studio’s output of the build on windows says the following:

docker: Error response from daemon: failed to create endpoint <ProjectName> on network nat: failed during hnsCallRawResponse: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20).
If the error persists, try restarting Docker Desktop.

Solution

Go to your Services administration panel (by running services.msc)

Stop the following services:
– HNS (Host Network Service)
– docker (Docker Engine)

Then restart them in the order of stopping.

This content has 3 years. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.