【问题标题】:Not able to deploy ASP .net vnext application on VM on Azure using Docker无法使用 Docker 在 Azure 上的 VM 上部署 ASP .net vnext 应用程序
【发布时间】:2015-09-10 03:44:50
【问题描述】:

我正在尝试在 Azure VM (ubuntu) 上部署 asp .net 5 示例应用程序。我正在为 Visual Studio 15 使用 Docker 工具。 我关注http://www.hanselman.com/blog/PublishingAnASPNET5AppToDockerOnLinuxWithVisualStudio.aspx

流程 1; 我已按照以下步骤操作; 1. 使用 VS15 创建示例应用 2.发布向导,创建新虚拟机 3. 发布,保持主机和容器相同的80端口。 4. 使用azure portal 暴露80端口

发布通过,但是在IE中打开时显示页面无法显示。

我什至创建了多个虚拟机并尝试了相同但没有成功。

流程 2; 我正在尝试使用 docker 客户端创建图像,但它给出了 TLS 错误。 您是否尝试在没有 TLS 的情况下连接到启用 TLS 的守护程序? 我什至在我的笔记本电脑上也得到了这个。正在尝试使用 127.0.0.1:2375 创建图像

有人可以帮忙吗?

我检查了容器日志;以下是详细信息。

 System.InvalidOperationException: Failed to resolve the following
     dependencies for target framework 'DNX,Version=v4.5.1':

当前运行时目标框架:'DNX,Version=v4.5.1 (dnx451)' 版本:1.0.0-beta7-15532 类型:单声道 架构:x64 操作系统名称:Linux

   at Microsoft.Dnx.ApplicationHost.Program.Main (System.String[] args)      [0x00000]
 in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()   [0x00000] i
n <filename unknown>:0
 at Microsoft.Dnx.Runtime.Commo`enter code here`n.EntryPointExecutor.Execute     (System.Reflection.

Assembly 程序集,System.Strenter 代码 hereing[] args,IServiceProvider serviceProvider) [0x00 000] 在 :0 在 Microsoft.Dnx.Host.Bootstrapper.RunAsync (System.Collections.Generic.List`1 参数,IRuntimeEnvironment env,System.Runtime.Versioning.FrameworkName targetFr amework) [0x00000] in :0

【问题讨论】:

    标签: asp.net ssl docker asp.net-core


    【解决方案1】:

    侯赛因, 您能否尝试以下提到的两个链接。如果您仍然遇到问题,请告诉我。我会和你一起追查这个问题。

    https://weblogs.asp.net/scottgu/announcing-windows-server-2016-containers-preview https://channel9.msdn.com/Series/Docker-for-NET-Developers/Deploy-your-ASPNET-5-App-to-a-Docker-Container-in-five-minutes

    【讨论】:

    • 我看过 channel9 的文章和视频,但只是这样做是行不通的。我正在使用 beta7 asp .net vnext。
    • 侯赛因,如果可行,请告诉我。我们可以进一步讨论以解决您的问题。
    • 你能分享你的 docker 文件吗?我希望你也在使用 asp net beta 7。
    • Windows Docker 文件来自 windowsservercore ADD 。 /app WORKDIR /app ENTRYPOINT ["cmd.exe", "/k", "web.cmd"]
    • FROM microsoft/aspnet:1.0.0-beta6 Ubuntu Docker 文件添加。 /app WORKDIR /app ENTRYPOINT ["./kestrel"]
    猜你喜欢
    • 2021-03-15
    • 1970-01-01
    • 1970-01-01
    • 2019-12-02
    • 1970-01-01
    • 2019-01-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多