我想在 GCP Cloud Run 上部署Hyperledger DotNet 中介代理。我有以下Dockerfile
。
FROM streetcred/dotnet-indy:1.14.2 AS base
WORKDIR /app
# Expose the default port
EXPOSE 5000
COPY mediator ./mediator
WORKDIR mediator
RUN dotnet restore "MediatorAgent.csproj"
RUN dotnet build "MediatorAgent.csproj" -c Release -o ./build
RUN dotnet publish "MediatorAgent.csproj" -c Release -o ./build
CMD dotnet ./build/MediatorAgent.dll --urls http://0.0.0.0:5000
如果我在我的系统上创建一个容器,Mediator Endpoint 工作正常。但是,如果我在 GCP Cloud Run 上部署它,我会收到以下错误
Unhandled exception. Hyperledger.Indy.IOException: An IO error occurred.
at Hyperledger.Aries.Storage.DefaultWalletService.GetWalletAsync(WalletConfiguration configuration, WalletCredentials credentials)
at Hyperledger.Aries.Configuration.DefaultProvisioningService.ProvisionAgentAsync(AgentOptions agentOptions)
at Hyperledger.Aries.Agents.Edge.MediatorProvisioningService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
at mediator.Program.Main(String[] args) in /app/mediator/Program.cs:line 17
有人可以帮我吗?
源代码和 Dockerfile 附在 zip 文件cloud-run-mediator-agent.zip
cloud-run-mediator-agent.zip 中