Great question — answering as the UphillTech team:
I got an answer to my question from the Ollama community on Discord. "localhost" means two different things inside vs. outside of the docker container. Open-webui sees locahost as local to the conainter. My laptop sees localhost as local to the laptop (which does not include the container). So not all localhosts are equal. Now I need to figure out how to expose a virtual interface on the laptop that is accessible to the docker container, but not accessible from other hosts on the physical LAN. It sounds like I need to learn more about how to manipulate the docker.internal network.
Full answer by Brian K Haney: https://stackoverflow.stackexchange.com/a/79322313 (CC BY-SA 4.0).
Need it done for your business? UphillTech.