Visual Studioの拡張機能thisを使用して、ビジュアルスタジオ2015でAzure DockerにASP.NET Core Webサイトを公開しようとしています。私はいろいろなアプローチを試みましたが、それぞれのアプローチでは展開できませんでした。Visual Studio 2015からAzureのドッカーに公開中にエラーが発生しました。
アプローチ1 ビジュアルスタジオから直接Windowsドッカーコンテナを作成しました。この場合、VMは正常に作成されたため、公開前に接続を正常に検証することができました。
しかし、エラー
Step 1 : FROM microsoft/aspnet:1.0.0-rc1-update1 Pulling repository
docker.io/microsoft/aspnet Error: image
microsoft/aspnet:1.0.0-rc1-update1 not found
アプローチ2 次で失敗しましたパブリッシュは、Visual Studioから直接、Linuxのドッキングウィンドウコンテナを作成しました。再度、VMが正常に作成され、公開前に接続を正常に検証できました。開かれたポート80とAzureのポータルからの古典的なVM作成さ
Executing command [docker --tlsverify -H tcp://vmname.southeastasia.cloudapp.azure.com:2376 logs cf32793c88939d664f67c651cbc75c4fb348fdd6fe85ea67322f9b5d049c0e70]
Failed to connect to http://vmname.southeastasia.cloudapp.azure.com/. If your Docker host is an Azure virtual machine, please make sure to set up the endpoint '80' using the Azure portal.
Container logs:
System.InvalidOperationException: The current runtime target framework is not compatible with 'MulitvideoMonitoring'.
Current runtime target framework: 'DNX,Version=v4.5.1 (dnx451)'
Version: 1.0.0-rc1-16231
Type: Mono
Architecture: x64
OS Name: Linux
OS Version: debian 7
Runtime Id: ubuntu.14.04-x64
Please make sure the runtime matches a framework specified in project.json
at Microsoft.Dnx.ApplicationHost.DefaultHost.GetEntryPoint (System.String applicationName) [0x00000] in <filename unknown>:0
at Microsoft.Dnx.ApplicationHost.Program.ExecuteMain (Microsoft.Dnx.ApplicationHost.DefaultHost host, System.String applicationName, 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] in <filename unknown>:0
at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute (System.Reflection.Assembly assembly, System.String[] args, IServiceProvider serviceProvider) [0x00000] in <filename unknown>:0
at Microsoft.Dnx.Host.Bootstrapper.RunAsync (System.Collections.Generic.List`1 args, IRuntimeEnvironment env, System.String appBase, System.Runtime.Versioning.FrameworkName targetFramework) [0x00000] in <filename unknown>:0
アプローチ3 :出版に私は次のエラーを得ました。接続の検証時に失敗しました。公開しながら、それはVMに接続し、次のエラーを与えたことができませんでした:
Executing command [docker --tlsverify -H tcp://vmname.cloudapp.net:2376 ps -a | select-string -pattern ":80->" | foreach { Write-Output $_.ToString().split()[0] }]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.DNX.Publishing.targets(386,5):
Error : An error occurred trying to connect: Get https://vmname.cloudapp.net:2376/v1.22/containers/json?all=1: dial tcp 23.97.54.64:2376:
connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
は、上記の3つのアプローチで問題を把握するためにあなたの助けを要求します。
いくつかの質問:Docker Daemonはtcpエンドポイントでリッスンしていますか? ドッカーホストにsshで「ドッカー-H tcp://vmname.southeastasia.cloudapp.azure.com:2376 ps」を実行すると動作しますか? dockerデーモンが外部からアクセス可能なリッスンしているtcpポートはありますか? – Mani