Streamlit stopped using localhost (continuation)

I have almost identical issue to this one:

If I write the address in an iframe in this manner in Docker;

<iframe src="http://localhost:8501/?embed=true&embed_options=show_padding" width="100%" height="1200px" style="border:none;"></iframe>

it does not work (connection refused)

But If I write the address in an iframe in this manner in Docker - copying the IP from terminal;

<iframe src="http://172.18.0.3:8501/?embed=true&embed_options=show_padding" width="100%" height="1200px" style="border:none;"></iframe>

It works perfectly.

My app and my Streamlit app are in the same container

Latest version;
streamlit 1.26.0
pip
Ubuntu 22.04

I stuck 2.0

Hi @robb

In the mentioned post, have you tried python -m http.server 8501 as mentioned in a reply.

Please also see a related Docs page:

It’s working now. Thank you!