Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is ${DOCKER_REGISTRY-} being set

When creating a new ASP.NET Core 3 project in Visual Studio for Mac, and then right clicking the project and selecting Add - Docker Support, IDE add docker-compose project to the solution and scaffolds the dockerfile for the API project.

docker-compose has the following entry by default:

services:
  project-name:
    image: ${DOCKER_REGISTRY-}projectname
  ...

It works out of the box, dockerfile gets processed, compose is called, all good. But what entity during the "compose up + debug" process defines the value for DOCKER_REGISTRY variable?

like image 702
Maxim V. Pavlov Avatar asked Nov 12 '19 07:11

Maxim V. Pavlov


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.

How do I access docker registry?

The url should be https://myregistry.com:5000/v2. But regarding UI, you have several projects dedicated to browse a docker registry, like: kwk/docker-registry-frontend, Portus (suse)


1 Answers

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.

See https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_02 for parameters expansion

like image 51
kitensei Avatar answered Oct 23 '22 00:10

kitensei