Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The DOCKER_REGISTRY variable is not set. Defaulting to a blank string

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).

like image 503
Avinash Singh Avatar asked Jun 28 '18 11:06

Avinash Singh


People also ask

What is Docker_registry?

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.

What is Docker registry URL?

The URL to use is docker pull index.docker.io/library/busybox.


1 Answers

I needed to set docker registry Environment Variable. Path needs to be lowercase for some reason.

[Environment]::SetEnvironmentVariable("DOCKER_REGISTRY", "d:\docker\registry\", "Machine")
like image 180
Donal Avatar answered Oct 09 '22 09:10

Donal