我正在使用docker-compose运行我的asp.net api应用程序。当我使用命令“ docker-compose up”时,收到错误消息:
Could not determine an appropriate location for storing user secrets. Set the DOTNET_USER_SECRETS_FALLBACK_DIR environment variable to a folder where user secrets should be stored.
在我的yml文件中,我有:
version: '3'
services:
kestrel_apache:
build: ./
ports:
- '80:80'
volumes:
- ./app:/root/app
- ./dev.conf:/etc/apache2/sites-available/dev.conf
- ./entrypoint.sh:/entrypoint.sh
entrypoint: ./entrypoint.sh
environment:
APACHE_RUN_DIR: /var/run/apache2
DOTNET_CLI_HOME: /tmp
DOTNET_USER_SECRETS_FALLBACK_DIR: ./secretTest
您可以在底部看到我添加了环境变量,并按照错误描述的方式对其进行了定义。我确保该文件夹存在。但是,我仍然收到此错误。我在做什么错了?