Akwbw commited on
Commit
22e92c8
·
verified ·
1 Parent(s): 43afadc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -7
Dockerfile CHANGED
@@ -5,19 +5,20 @@ USER root
5
  ENV DEBIAN_FRONTEND=noninteractive
6
  ENV TAR_OPTIONS="--no-same-owner --no-same-permissions"
7
 
8
- # Minimal required packages
9
  RUN apt-get update && \
10
- apt-get install -y --no-install-recommends python3-pip apksigner zipalign && \
11
  rm -rf /var/lib/apt/lists/*
12
 
 
 
 
 
13
  # Shallow clone Flutter
14
  RUN git clone https://github.com/flutter/flutter.git -b stable --depth 1 /opt/flutter && \
15
  git config --global --add safe.directory /opt/flutter
16
 
17
- # Environment Variables
18
- ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
19
  ENV FLUTTER_HOME=/opt/flutter
20
- ENV PATH=${PATH}:${JAVA_HOME}/bin:/opt/flutter/bin
21
 
22
  # Precache Android artifacts
23
  RUN flutter config --no-analytics && \
@@ -31,9 +32,8 @@ RUN pip3 install --no-cache-dir -r requirements.txt || pip3 install --no-cache-d
31
 
32
  COPY . .
33
 
34
- # Permissions for app & flutter
35
  RUN chmod -R 777 /app /opt/flutter
36
 
37
  EXPOSE 7860
38
- # 403 AXIOS ERROR FIX (Disabled CORS, XSRF & Increased Upload Limit)
39
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false", "--server.maxUploadSize=1000"]
 
5
  ENV DEBIAN_FRONTEND=noninteractive
6
  ENV TAR_OPTIONS="--no-same-owner --no-same-permissions"
7
 
8
+ # Install Python, Java 17, apksigner, zipalign
9
  RUN apt-get update && \
10
+ apt-get install -y --no-install-recommends python3-pip openjdk-17-jdk apksigner zipalign && \
11
  rm -rf /var/lib/apt/lists/*
12
 
13
+ # Set JDK path
14
+ ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
15
+ ENV PATH=${PATH}:${JAVA_HOME}/bin:/opt/flutter/bin
16
+
17
  # Shallow clone Flutter
18
  RUN git clone https://github.com/flutter/flutter.git -b stable --depth 1 /opt/flutter && \
19
  git config --global --add safe.directory /opt/flutter
20
 
 
 
21
  ENV FLUTTER_HOME=/opt/flutter
 
22
 
23
  # Precache Android artifacts
24
  RUN flutter config --no-analytics && \
 
32
 
33
  COPY . .
34
 
35
+ # Permissions
36
  RUN chmod -R 777 /app /opt/flutter
37
 
38
  EXPOSE 7860
 
39
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false", "--server.maxUploadSize=1000"]