Wrong Dockerfile configuration on Deploy Streamlit using Docker docs page
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- docker, python
- Área
- devops, documentation
Línea de trabajo
Abre la página «Deploy Streamlit using Docker» e inspecciona el ejemplo de Dockerfile en torno a WORKDIR, git clone y pip3 install. Compila el ejemplo documentado para confirmar el fallo notificado y verificar que las instrucciones publicadas se completan correctamente con el directorio de trabajo previsto.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- JavaScript
- Estrellas
- 178
- Forks
- 708
- Merge medio
- 1 d 12 h
- PR fusionados (30 d)
- 12
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de streamlit/docs
-
docs needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 2 días
-
Fix description of Azure SQL supportPosiblemente ocupada @Nikhil-jaiswal007 la tomó hace 176 días. Abiertodocs needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
streamlit/docs#1260 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
docs
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
streamlit/docs#719 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 2 días
-
App.run() does not serve a mounted ASGI app (routes=[Mount(...)]) that works with uvicorn.run(app)Abiertobug needs triage
Dificultad 4/5 1-2 días Aptitud para principiantes 22/100
Los mantenedores suelen responder en 2 días
-
docs needs triage
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
Todos los issues de streamlit/docs
Issues similares
-
[dsh-plugin.org | dsh-plugin-hub] plugin distribution incomplete: yjh051108/dsh-routing-suiteAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 71/100
yjh051108/dsh-routing-suite#227 ·
-
needs-triage release-watch
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dusk-network/exu#17 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
jspreadsheet/ce#1809 ·
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
githubnext/gh-aw-workshop#4458 ·
Los mantenedores suelen responder en 1 día