File size: 815 Bytes
b8188dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
33
# Base Android image from CirrusCI (Best for Cloud APK build)
FROM cirrusci/android-sdk:33

# Working as root
USER root

# System tool updates & openjdk-17 install
RUN apt-get update && \
    apt-get install -y python3 python3-pip openjdk-17-jdk apksigner zipalign curl && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Fix Environment variable pointers
ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64
ENV ANDROID_HOME /opt/android-sdk
ENV PATH ${PATH}:${JAVA_HOME}/bin

WORKDIR /app

# Dependency Copy & Pip Installations
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt

# Final project mapping
COPY . .

# Grand root permission for reading folders & gradlew outputs
RUN chmod -R 777 /app

EXPOSE 7860

# Starting API Engine automatically on boot
CMD ["python3", "app.py"]