docs
docs copied to clipboard
Docker docs create a container that does not work in single-stack ipv6 environments
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:
- Binds to
[::]:8501
and0.0.0.0:8501
- 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.