-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
26 lines (19 loc) · 754 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Use the official Python image as the base image
FROM python:3.10.11-slim-bullseye
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set the working directory inside the container
WORKDIR /app
# Copy the requirements.txt file and install the dependencies
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
#Installing Git
RUN apt-get update && apt-get install -y git
# Copy the entire app directory to the container
COPY . /app/
# Expose the port that FastAPI will listen on (if your app is using a different port, change it here)
EXPOSE 8000
# Run the FastAPI application
#CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
CMD [ "python", "/app/main.py" ]