Kes*_*115 5 amazon-ec2 docker-compose
I tried to run this hello world app on an AWS EC2 instance with docker-compose up --build . It works as expected and is accessible remotely from the EC2 public IP when I use port 80 i.e., "80:80" as shown in the docker-compose file.
However, if I change to another port such as "5106:80", it is not accessible from a remote host using <public IPv4 address>:5106 even though it's available locally if I ssh unto the EC2 instance and try localhost:5106. Please note:
I've ensured the EC2 is in a public subnet and I have configured the security group to make the port (in this case, 5106) accept inbound traffic from my laptop.
I know it's not a problem with the hello-world app because I experience exactly the same problem with another app i.e., only port 80 works with docker-compose port mapping on EC2.
由于它适用于端口80并且不适用于端口,5106因此可能意味着以下两种可能性之一:
5106在您的inbound rules。80或 )中的网页443。如果其他设备或其他网络上发生这种情况,您可以尝试。在这种情况下,似乎是后者。
| 归档时间: |
|
| 查看次数: |
238 次 |
| 最近记录: |