I have created a new DotNetCore 2.0 web project in VisualStudio 2017. I have docker running in machine with Docker Server Host configured for Windows.
While running solution i'm getting below error,
'The DOCKER_REGISTRY variable is not set. Defaulting to a blank string.'
Building myfirstdotnetcore Service 'myfirstdotnetcore' failed to build:
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
It is an environment var on your pc or remote server, try to type : $ echo $DOCKER_REGISTRY. the docker entry means "If variable DOCKER_REGISTRY is not set or null, use default", then it is prepended to your project name.
The URL to use is docker pull index.docker.io/library/busybox.
I needed to set docker registry Environment Variable. Path needs to be lowercase for some reason.
[Environment]::SetEnvironmentVariable("DOCKER_REGISTRY", "d:\docker\registry\", "Machine")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With