falcon-api / Dockerfile
ngocminhta's picture
Update Dockerfile
c031c26
raw
history blame contribute delete
556 Bytes
FROM python:3.10-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN useradd -m -u 1000 user
WORKDIR /app
COPY requirements.txt .
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip && \
pip install -r requirements.txt
COPY . .
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
ENV PORT=8000
EXPOSE $PORT
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]