【发布时间】:2020-08-10 14:50:36
【问题描述】:
我正在学习将 blazor 服务器应用程序加载到 docker 容器(aspnet core 3.0.201)。我已成功将图像加载到容器上。我能够创建一个构建它的应用程序,但是在运行 blazor 服务器应用程序时,我收到了这种警告:
warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container.
Protected data will be unavailable when container is destroyed.
这是一个警告,但我知道在容器上加载密钥不是一个好习惯,所以我想修复警告。任何指导表示赞赏。
【问题讨论】:
-
你可以看看这篇文章。 docs.microsoft.com/en-us/aspnet/core/security/data-protection/…。基本上你可以使用 Cloud(Azure 等)或 Redis
标签: docker