Skip to content

Commit 7f0186f

Browse files
committed
chore: python docker repair
1 parent d88af3f commit 7f0186f

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

TelegramDownloader/Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,16 @@ RUN apt-get update && \
3030

3131
COPY ./WebDav /app/WebDav
3232
RUN python3 -m venv /app/venv
33-
RUN ln -sf /app/venv/bin/python /usr/bin/python
34-
RUN /app/venv/bin/pip install --upgrade pip
35-
RUN /app/venv/bin/pip install -r /app/WebDav/requirements.txt
33+
34+
# Añade el venv al PATH para que "python" y los scripts (uvicorn, etc.) estén disponibles globalmente
35+
ENV PATH="/app/venv/bin:${PATH}"
36+
37+
# Actualiza pip e instala requirements dentro del venv
38+
RUN python -m pip install --upgrade pip
39+
RUN python -m pip install -r /app/WebDav/requirements.txt
40+
41+
# Comprobación opcional para fallar la build si falta uvicorn
42+
RUN python -c "import uvicorn; print('uvicorn OK', uvicorn.__version__)"
3643

3744
COPY --from=publish /app/publish .
3845
ENTRYPOINT ["dotnet", "TelegramDownloader.dll"]

0 commit comments

Comments
 (0)