I'm using the "Windows 2019 with containers" AMI on an EC2 instance. This allows me to deploy Windows based Docker containers (not Docker Linux-based containers). The networking variant that's configured out of the box is 'nat'. I haven't succeeded in setting up another networking type.
The reason to deploy on EC2 is that we'd like to mix (newer) Windows container based services with legacy native services on a single host.
However, if I deploy a web-service on the host outside of the container, then I can't call that from the container using the IP address of the host. I haven't been able to determine if there's an alternate address that would work.
Outside of AWS (EC2), this is supported by Windows 2019, but the network setup in AWS and of course the virtualization appears to put some constraints on what's possible.
Calling the web-service from outside the container, direcly on the host, works.
A container on this host can post a request to a webservice outside of the host.
A container on this host can post a request to a webservice in another container on the host (apparantly the port mapping works). The address I'm using is then simply the IP address of the host.
I there a way to call, from a windows-container on Windows 2019 on EC2, a service on the same host?