Cannot run Dot net core preview project on Docker

前端 未结 3 1962
北荒
北荒 2021-01-18 03:34

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 re

相关标签:
3条回答
  • 2021-01-18 04:13

    As the error states Error The DOCKER_REGISTRY variable is not set. - you should add it to your environment variables.

    To do so simply type the following command with the corresponding registry URL into your cli:

    export DOCKER_REGISTRY=<your-docker-registry>
    
    0 讨论(0)
  • 2021-01-18 04:29

    Responding little late. I had this issue and has resolved after taken below steps.

    1. Run Visual Studio as Administrator
    2. Your running Docker host should logged-in to your DockerHub account. This is very important. The ENV variable mentioned has set after this step.

    The main reason for this issue is Visual Studio couldn't download nano server image from docker hub as it couldn't see any dockerhub details. So always make sure that you logged in to your dockerhub account from running docker host or you may manually set this registry, which I think not a perfect way.

    You can verify this through Visual Studio output window.

    0 讨论(0)
  • 2021-01-18 04:30

    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.

    0 讨论(0)
提交回复
热议问题