docs icon indicating copy to clipboard operation
docs copied to clipboard

Docker docs create a container that does not work in single-stack ipv6 environments

Open rmartine-ias opened this issue 1 year ago • 0 comments

Link to doc page in question (if any): https://github.com/streamlit/docs/blob/main/content/kb/tutorials/deploy/docker.md

Name of the Streamlit feature whose docs need improvement: Create a Dockerfile

What you think the docs should say: The ENTRYPOINT should not have this argument: "--server.address=0.0.0.0". This makes the app not bind to [::], causing issues in our ipv6-only k8s clusters.

We have a Dockerfile that says this instead: CMD ["streamlit", "run", "home.py", "--server.port=8501", "--browser.serverAddress=localhost"].

I'm not sure if this is the best, but it does two things right:

  1. Binds to [::]:8501 and 0.0.0.0:8501
  2. Makes it so when you docker run, the URL provided to access streamlit works

Additional improvements: You may want to bump the image to python3.11 or later, as 3.9 is EOL soon.

rmartine-ias avatar Feb 09 '24 18:02 rmartine-ias