を使用すると、特別なネットワーク構成がありませんならば、インスタンスのnetwork_securityグループで変更を行うとアウトバウンドのルールを許可し、 。デフォルトの「ブリッジ」モード が使用されます。
あなたの説明によると、あなたはVMを使用していて、ドッカーを実行しているようです。 あなたは、インターネットからこのドッキングウィンドウにアクセスしたい場合は、我々は例えば、ローカルポートにドッキングウィンドウポートをマッピングする必要があります。私たちは、このVMにポート80をマッピング
docker run -d -p 80:80 my_image service nginx start
した後、我々は、Azureのネットワーク・セキュリティ・グループへのインバウンドルールを追加する必要があります(NSG)を追加するには、articleに従うことができます。
さらに、ポート80をOSファイルwallインバウンドルールに追加する必要があります。
更新:
誤解のために申し訳ありません。ここで
は私のテストで、私はこのように、その後、CentOSのドッキングウィンドウを作成し、AzureのVM(Ubuntuの16)にドッキングウィンドウをインストールします。
[email protected]:~# docker run -i -t centos bash
Unable to find image 'centos:latest' locally
latest: Pulling from library/centos
d9aaf4d82f24: Pull complete
Digest: sha256:4565fe2dd7f4770e825d4bd9c761a81b26e49cc9e3c9631c58cfc3188be9505a
Status: Downloaded newer image for centos:latest
[[email protected] /]# ping www.google.com
PING www.google.com (172.217.3.100) 56(84) bytes of data.
64 bytes from lga34s18-in-f4.1e100.net (172.217.3.100): icmp_seq=1 ttl=47 time=7.93 ms
64 bytes from lga34s18-in-f4.1e100.net (172.217.3.100): icmp_seq=2 ttl=47 time=8.13 ms
64 bytes from lga34s18-in-f4.1e100.net (172.217.3.100): icmp_seq=3 ttl=47 time=8.15 ms
^C
--- www.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 7.939/8.076/8.153/0.121 ms
[[email protected] /]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=51 time=1.88 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=51 time=1.89 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=51 time=1.86 ms
c64 bytes from 8.8.8.8: icmp_seq=4 ttl=51 time=1.87 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=51 time=1.78 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=51 time=1.87 ms
^C
--- 8.8.8.8 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5009ms
rtt min/avg/max/mdev = 1.783/1.861/1.894/0.061 ms
[[email protected] /]#
私はそれがインターネットとのコミュニティできます、あなたは私を見るください可能性あなたの問題に関する詳細情報?
アプリが外部からアクセスできる場合は、restapiが失敗する理由(IMHO)は表示されません..正確なエラーメッセージは何ですか – TheGameiswar
@TheGameiswar自分のREST APIには到達できません。期待どおりに動作します。 – Matze
私はちょうど愚かでした( - 'Hangfire'ジョブコンポーネントが非同期で実装され、応答を待っている間にクラッシュしたバグがありました(基本的な 'HttpClient'は使用中に処分されました)。私はその問題を修正した後、アウトバウンド通信が期待通りに機能しました... – Matze