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.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.