Expose localhost port in container

It isn’t really possible to map the container’s localhost to the outside. The process in the container must bind to the container’s eth0. It looks like that is what you accomplished by removing the -a localhost from that command.

A workaround might be to run another process in the container that listens on the container’s eth0 and proxies for you, but that isn’t really a solution in my book.