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