-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 874 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 874 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
28
29
30
31
32
# Use the official Ubuntu base image
FROM ubuntu:20.04
# Set the working directory
WORKDIR /app
# Install system dependencies including Python 3.9 and pip
RUN apt-get update && apt-get install -y \
python3.9 \
python3.9-distutils \
python3.9-dev \
build-essential \
curl \
&& apt-get clean
# Install pip for Python 3.9
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.9 get-pip.py
# Copy your code into the container
COPY . /app/
# Set the working directory to /app/backend
WORKDIR /app/backend
# Install the dependencies from the backend's requirements.txt using Python 3.9
RUN python3.9 -m pip install -r requirements.txt
# Expose the necessary port
EXPOSE 8080
# Command to start the application using Python 3.9
CMD ["python3.9", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080", "--no-access-log"]