在Mono Docker容器中运行Grapevine REST服务器

我用Grapevine构build了一个简单的REST服务器,可以在Windows环境下运行。 现在我想运行带单声道的Docker容器中的.exe(带Grapevine.dll)。 我的Dockerfile看起来像这样:

FROM mono:latest COPY . /boerse RUN output="$(curl http://169.254.169.254/latest/meta-data/public-hostname)" CMD [ "mono", "/boerse/Boerse.exe", "$output" ] 

当Docker容器启动时,会出现以下错误消息:

 Error: System.TypeLoadException: Could not load type 'Grapevine.Interfaces.Server.HttpListener' from assembly 'Grapevine, Version=4.0.0.195, Culture=neutral, PublicKeyToken=null'. at Boerse.BoersenApplication.Main (System.String[] args) [0x0002f] in <407ced228a394aa7b9fc2fa883a239a9>:0 TypeRef ResolutionScope not yet handled (57) for .ExtendedProtectionSelector in image /boerse/Grapevine.dll Could not load signature of Grapevine.Interfaces.Server.HttpListener:get_ExtendedProtectionSelectorDelegate due to: Could not resolve type with token 0100003a assembly: type:ExtendedProtectionSelector member:<none> TypeRef ResolutionScope not yet handled (57) for .ExtendedProtectionSelector in image /boerse/Grapevine.dll Could not load signature of Grapevine.Interfaces.Server.IHttpListener:get_ExtendedProtectionSelectorDelegate due to: Could not resolve type with token 0100003a assembly: type:ExtendedProtectionSelector member:<none> 

所有需要的DLL被复制到容器中。 任何人都知道如何在Docker容器中运行Grapevine或者我在做什么错误?

Interesting Posts