acecalisto3 commited on
Commit
f33a3f3
1 Parent(s): 44c9594

Create DOCKERFILE.py

Browse files
Files changed (1) hide show
  1. DOCKERFILE.py +33 -0
DOCKERFILE.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Start from a base Python image
2
+ FROM python:3.9-slim-buster
3
+
4
+ # Set environment variables
5
+ ENV PYTHONUNBUFFERED 1
6
+ ENV PIP_Disable_Pipfunc 1
7
+
8
+ # Update package lists and upgrade packages
9
+ RUN apt-get update && apt-get install -y \
10
+ gcc \
11
+ musl-dev \
12
+ libffi-dev
13
+
14
+ # Upgrade pip and set the index URL
15
+ RUN pip install --upgrade pip &&\
16
+ pip config set global.index-url https://pypi.python.org/simple
17
+
18
+ # Copy the requirements file and install dependencies
19
+ COPY requirements.txt /app/requirements.txt
20
+ WORKDIR /app
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Change the working directory
24
+ WORKDIR /app
25
+
26
+ # Copy the rest of the codebase files
27
+ COPY . /app
28
+
29
+ # Expose the port number
30
+ EXPOSE 5000
31
+
32
+ # Define entrypoint script
33
+ ENTRYPOINT ["python", "./app.py"]