rkihacker commited on
Commit
055f019
·
verified ·
1 Parent(s): 7adfb7a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +44 -0
Dockerfile ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:20.04
2
+
3
+ # Prevent interactive prompts
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
+
6
+ # Install essential dependencies for the web server and buildozer
7
+ RUN apt-get update && \
8
+ apt-get install -y \
9
+ git \
10
+ zip \
11
+ unzip \
12
+ openjdk-17-jdk \
13
+ python3.8 \
14
+ python3.8-dev \
15
+ python3.8-venv \
16
+ python3-pip \
17
+ libffi-dev \
18
+ build-essential \
19
+ autoconf \
20
+ autotools-dev \
21
+ libltdl-dev \
22
+ libtool \
23
+ ccache \
24
+ && apt-get clean
25
+
26
+ # Set Python 3.8 as the default
27
+ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
28
+
29
+ # Create a working directory
30
+ WORKDIR /app
31
+
32
+ # Copy the web application files
33
+ COPY . .
34
+
35
+ # Install Python dependencies for the web app
36
+ RUN pip3 install --upgrade pip
37
+ RUN pip3 install -r requirements.txt
38
+ RUN pip3 install buildozer
39
+
40
+ # Expose the port the app runs on
41
+ EXPOSE 5000
42
+
43
+ # Run the web application
44
+ CMD ["python3", "main.py"]