-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (20 loc) · 825 Bytes
/
Dockerfile
File metadata and controls
27 lines (20 loc) · 825 Bytes
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
27
# Efficient stack ordering for building and running Python applications
# - Keep the image size small
# - Use a Python base image
# - Use a .dockerignore file to exclude unwanted files
# - Install the package dependencies first
# - Copy the application code to the container at the last
# Use the official Python base image with Python 3.8
FROM python:3.11-slim
# Set the working directory inside the container
WORKDIR /prepWise
# Copy the application code to the container
COPY requirements.txt .
# Install the dependencies
RUN pip install -r requirements.txt
# Expose the port that the FastAPI app will run on
EXPOSE 8000
# Copy the application code to the container at the last
COPY . .
# Run the Fast API application, use fastapi default port 8000.
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]