haproxy / docker No enabled listener found (check for 'bind' directives) ! Exiting haproxy / docker No enabled listener found (check for 'bind' directives) ! Exiting docker docker

haproxy / docker No enabled listener found (check for 'bind' directives) ! Exiting


Thanks to @Michael comment. I was able to solve the problem.

First I remove the haproxy command from the dockerfile. And then I run the haproxy command manually inside the container.

Voila! My config file is not a file. Its a directory. LOL

The problem is in my docker command -v.

I change it to full path

-v FULL_PATH/customhaproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg


You will want to remove the daemon keyword from your docker file - docker needs a foreground process to be running otherwise docker will exit immediately.

I think the error message you are seeing is because docker exits quicker than haproxy binds to any ports.


I actually had to restart docker-machine (using OSX), otherwise every time I was running container with volume mount option (tried both absolute and relative paths) - it was mounting haproxy.cfg as a directory