As far as I know, by default, Docker binds to 127.0.0.1 when running docker compose with the default network settings. To access my containers, I need to map alternate ports to access them through localhost, such as 45001:80 to access my web server container from the host.
I would like to bind my containers to an alternate IP then 127.0.0.1 on my machine so I can use the proper ports instead of having to forward the ports through localhost. For example, to access my web server container, instead of going to 127.0.0.1:45001, I would bind to something like 192.168.0.1 and access it via 192.168.0.1:80. I've tried searching for an answer for this, but I can't seem to find it. Going through the Docker documentation hasn't gotten me terribly far either.
Anybody know how I would accomplish this?