20 lines
419 B
Docker
20 lines
419 B
Docker
FROM python:latest
|
|
|
|
WORKDIR ./
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
RUN mkdir app
|
|
ENV PYTHONPATH=/app
|
|
|
|
COPY . ./app
|
|
|
|
# Asegúrate de que el script auto.sh sea ejecutable
|
|
RUN chmod +x /app/auto.sh
|
|
|
|
RUN ls
|
|
|
|
# Ejecuta el script auto.sh al iniciar el contenedor, luego ejecuta uvicorn
|
|
CMD ["/bin/sh", "-c", "/app/auto.sh && uvicorn app.main:app --reload --host 0.0.0.0 --port 8000"]
|
|
|