I have just created a web application with the latest .Net Core Preview sdks.
I am trying to run it on Linux Docker however the project does not build.
The error I am receiving is:
Error The DOCKER_REGISTRY variable is not set.
Defaulting to a blank string.Creating network "dockercompose11433628216532645154_default" with the default driver
Building testapppreview2
Service 'testapppreview2' failed to build: manifest for microsoft/aspnetcore:2.1 not found.
My docker-compose.yml file
version: '3.4'
services:
testapppreview2:
image: ${DOCKER_REGISTRY}testapppreview2
build:
context: .
dockerfile: TestAppPreview2/Dockerfile
Its override is:
version: '3.4'
services:
testapppreview2:
environment:
- ASPNETCORE_ENVIRONMENT=Development
ports:
- "80"
Can someone direct me some direction please?
Further information:
The error points me to this file:
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets 363
When you get this error you should take a look at Output -> Docker
, usually it shows what is the problem. It could be that container you are trying to overwrite is running. Or some other configuration problem.
By reading Docker Output you should be able to quickly deduce what is the problem and fix it. Too bad that Visual Studio doesn't instruct you to do this, but for now only give this generic The DOCKER_REGISTRY variable is not set
error.
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