ASPNETCORE_ENVIRONMENT in Docker

前端 未结 5 1065
温柔的废话
温柔的废话 2021-01-17 07:35

i have problems setting the ASPNETCORE_ENVIRONMENT variable running my project in a docker container. The problem is that the value is alwa

5条回答
  •  逝去的感伤
    2021-01-17 07:52

    Thanks for your comments, I solved my issue. It was just my mistake.

    My problem was that when I added Docker-Support to my project I already had a Dockerfile included in the project.

    When VS generated files for Docker-support, there was a second Dockerfile created, and one of the Dockerfiles was renamed to "Dockerfile.original".

    I was using the "Dockerfile" visible in the solution explorer (which was somehow mapped to the "Dockerfile.original" file in the filesystem)

    It seems that in the background my changes where written to "Dockerfile.original" but this file wasn't used while docker-compose was running. It used the empty generated Dockerfile that wasn't visible in the Solution explorer.

提交回复
热议问题