Wrong Dockerfile configuration on Deploy Streamlit using Docker docs page
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 55/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- docker, python
- 领域
- devops, documentation
调研方向
打开“Deploy Streamlit using Docker”页面,检查 WORKDIR、git clone 和 pip3 install 附近的 Dockerfile 示例。构建文档中的示例,以确认报告的失败,并验证已发布的说明是否能在预期的工作目录下成功完成。
由索引模型根据 Issue 内容生成。
描述
Checklist
- I have searched the existing issues for similar issues.
- I added a very descriptive title to this issue.
- I have provided sufficient information below to help reproduce this issue.
Summary
Hey
Today by following the manual at Deploy Streamlit using Docker (https://docs.streamlit.io/knowledge-base/tutorials/deploy/docker) I run into the problem of setting a WORKDIR for the Docker.
The WORKDIR has to be moved after the RUN git clone method for the Docker to set the WORKDIR correctly. Otherwise, it results in Docker being unable to set the WORKDIR and default to running the commands in its directory.
This way the docker build fails at RUN pip3 install -r requirements.txt
Wrong version:
# app/Dockerfile
FROM python:3.9-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/streamlit/streamlit-example.git .
RUN pip3 install -r requirements.txt
EXPOSE 8501
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
Corrected version:
# app/Dockerfile
FROM python:3.9-slim
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/streamlit/streamlit-example.git .
WORKDIR /app
RUN pip3 install -r requirements.txt
EXPOSE 8501
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
ran
Reproducible Code Example
No response
Steps To Reproduce
No response
Expected Behavior
No response
Current Behavior
No response
Is this a regression?
- Yes, this used to work in a previous version.
Debug info
- Streamlit version:
- Python version:
- Operating System:
- Browser:
Additional Information
No response
- 主要语言
- JavaScript
- 星标
- 178
- 派生
- 708
- 平均合并
- 1 天 21 小时
- 30 天内合并 PR
- 19
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
streamlit/docs 的其他 Issue
-
docs needs triage
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 2 天内回复
-
Fix description of Azure SQL support可能已有人在做 @Nikhil-jaiswal007 于 180 天前认领。 未关闭docs needs triage
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 2 天内回复
-
docs
难度 2/5 1-3 小时 新手友好度 62/100
streamlit/docs#719 · 2 条评论 · 1 个 reaction ·
维护者通常 2 天内回复
-
App.run() does not serve a mounted ASGI app (routes=[Mount(...)]) that works with uvicorn.run(app)未关闭bug needs triage
难度 4/5 1-2 天 新手友好度 22/100
维护者通常 2 天内回复
-
docs needs triage
难度 3/5 1-2 天 新手友好度 35/100
维护者通常 2 天内回复
相似的 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 74/100
andromarces/agent-loops#886 ·
维护者通常 1 天内回复
-
bug effort:low model:light plan planner:gpt-6-1-sol tests
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
B: visual
难度 2/5 1-3 小时 新手友好度 65/100
FreeTubeApp/FreeTube#9929 ·
维护者通常 1 天内回复
-
status: in triage type: bug
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
🔧 in development
难度 2/5 1-3 小时 新手友好度 72/100