Hey all,
I am having some issues running haproxy as a container instance when trying to bind to port 80/443 in the haproxy.cfg:
frontend fe-web
bind *:80
bind *:443 ssl crt certlocation
The container instance goes into a failed state, with error:
[ALERT] (58) : Binding [/usr/local/etc/haproxy/haproxy.cfg:37] for frontend fe-web: cannot bind socket (Permission denied) for [0.0.0.0:80]
[ALERT] (58) : Binding [/usr/local/etc/haproxy/haproxy.cfg:38] for frontend fe-web: cannot bind socket (Permission denied) for [0.0.0.0:443]
When I changed the bind ports to 8080 / 8443 , the container starts up fine without the permission denied error.
I have tried starting the container instance with --privileged , with --run-as--user 0 (or --run-as-user root) as well as --run-as-group 0 (or root). Still no luck.
Even changing the haproxy user in haproxy.cfg to root does not resolve the issue, example:
user haproxy
group haproxy
->
user root
group root
Does anyone have a solution for this? Is there a reason I am able to bind to ports 8080/8443, but not 80/443 in Azure?
Please let me know if any additional information is needed.
Thank you in advance!