Akwbw commited on
Commit
094fe0d
·
verified ·
1 Parent(s): f0f1694

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -0
Dockerfile ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image
2
+ FROM cirrusci/android-sdk:33
3
+
4
+ # Root user
5
+ USER root
6
+
7
+ # 1. Update & Install Tools
8
+ RUN apt-get update && \
9
+ apt-get install -y python3 python3-pip openjdk-17-jdk apksigner zipalign && \
10
+ apt-get clean && \
11
+ rm -rf /var/lib/apt/lists/*
12
+
13
+ # 2. Environment Variables
14
+ ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64
15
+ ENV ANDROID_HOME /opt/android-sdk
16
+ ENV PATH ${PATH}:${JAVA_HOME}/bin
17
+
18
+ # Working Directory
19
+ WORKDIR /app
20
+
21
+ # Requirements Copy
22
+ COPY requirements.txt .
23
+
24
+ # Install Flask and dependencies
25
+ RUN pip3 install --no-cache-dir flask
26
+ RUN pip3 install --no-cache-dir -r requirements.txt
27
+
28
+ # Files Copy
29
+ COPY . .
30
+
31
+ # Permissions
32
+ RUN chmod -R 777 /app
33
+
34
+ # Port Expose
35
+ EXPOSE 7860
36
+
37
+ # Run Command (Flask App on Port 7860)
38
+ CMD ["python3", "app.py"]