yasirmalik786's picture
Upload 3 files
89e49dc verified
raw
history blame
516 Bytes
FROM python:3.12.6
# Set working directory inside container
WORKDIR /code
# Copy requirements file (fixing the typo in the filename and path)
COPY ./requirement.txt /code/requirement.txt
# Install dependencies
RUN pip install --no-cache-dir --upgrade -r /code/requirement.txt
# Add a non-root user and switch to it
RUN useradd -m user
USER user
# Copy the FastAPI app code
COPY . /code
# Command to run the app with uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]