14 lines
350 B
Docker
14 lines
350 B
Docker
ARG PYTHON_BASE_IMAGE=python:3.11-slim
|
|
FROM ${PYTHON_BASE_IMAGE}
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
ARG PIP_INDEX_URL
|
|
RUN if [ -n "$PIP_INDEX_URL" ]; then pip config set global.index-url "$PIP_INDEX_URL"; fi \
|
|
&& pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|