On Windows 11 with Docker Desktop, I'm running an application where part of it runs on the host and part of it runs on some Docker containers that the host's application process launches. The containers' application processes actually run the same executable (by -v mounting from the host) but with different options. That uses networking, right? But inside my application, when the host tries to communicate with the client, it gets blocked by the firewall and the user is shown the "Windows Security Alert":
I don't understand why this is necessary since the -v mounting is working without it. Also, the user actually must check PUBLIC networks to get it working, even though my current Ethernet LAN connection is set to private.
One alternative could be running this inside the host application:
netsh advfirewall firewall add rule name="TestRunner" dir=in action=allow protocol=tcp program="{Assembly.GetExecutingAssembly().Location}"
But running that will issue a UAC prompt which is more opaque than the Windows Security Alert (at least it doesn't require the user to change the checkbox though).
I'm using the default Docker container networking and adding -it to the Docker run command.
I'd like to avoid either of the networking prompts. Is that possible?
