sudo-soldier commited on
Commit
de21d8d
·
verified ·
1 Parent(s): 4fd4428

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -63
Dockerfile CHANGED
@@ -1,71 +1,20 @@
1
- FROM python:3.9-slim as backend
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
- openjdk-11-jdk \
5
- wget \
 
 
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
- RUN wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool \
9
- && wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.7.0.jar \
10
- && mv apktool_2.7.0.jar apktool.jar \
11
- && chmod +x apktool* \
12
- && mv apktool* /usr/local/bin/
13
 
 
 
14
  WORKDIR /app
15
- COPY backend/requirements.txt .
16
- RUN pip install --no-cache-dir -r requirements.txt
17
- COPY backend/app /app/app
18
 
19
- FROM node:18 as frontend
20
- WORKDIR /app
21
- COPY frontend/package*.json .
22
- RUN npm install
23
- COPY frontend .
24
- RUN npm run build
25
-
26
- FROM python:3.9-slim
27
- COPY --from=backend /usr/local/bin/apktool* /usr/local/bin/
28
- COPY --from=backend /usr/lib/jvm /usr/lib/jvm
29
- COPY --from=backend /app /app
30
- COPY --from=frontend /app/build /app/frontend
31
-
32
- WORKDIR /app
33
- RUN pip install fastapi uvicorn python-multipart
34
-
35
- EXPOSE 8000
36
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]FROM python:3.9-slim as backend
37
-
38
- RUN apt-get update && apt-get install -y \
39
- openjdk-11-jdk \
40
- wget \
41
- && rm -rf /var/lib/apt/lists/*
42
-
43
- RUN wget https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool \
44
- && wget https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.7.0.jar \
45
- && mv apktool_2.7.0.jar apktool.jar \
46
- && chmod +x apktool* \
47
- && mv apktool* /usr/local/bin/
48
-
49
- WORKDIR /app
50
- COPY backend/requirements.txt .
51
- RUN pip install --no-cache-dir -r requirements.txt
52
- COPY backend/app /app/app
53
-
54
- FROM node:18 as frontend
55
- WORKDIR /app
56
- COPY frontend/package*.json .
57
- RUN npm install
58
- COPY frontend .
59
- RUN npm run build
60
-
61
- FROM python:3.9-slim
62
- COPY --from=backend /usr/local/bin/apktool* /usr/local/bin/
63
- COPY --from=backend /usr/lib/jvm /usr/lib/jvm
64
- COPY --from=backend /app /app
65
- COPY --from=frontend /app/build /app/frontend
66
-
67
- WORKDIR /app
68
- RUN pip install fastapi uvicorn python-multipart
69
 
70
- EXPOSE 8000
71
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
 
1
+ FROM node:20-bullseye-slim
2
 
3
+ # Install Java, wget, unzip, Bubblewrap deps
4
  RUN apt-get update && apt-get install -y \
5
+ openjdk-17-jdk \
6
+ wget unzip git \
7
+ libpulse-dev libgl1-mesa-dev \
8
+ && npm install -g bubblewrap \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Install Python + Gradio
12
+ RUN pip install gradio
 
 
 
13
 
14
+ # Copy source files
15
+ COPY . /app
16
  WORKDIR /app
 
 
 
17
 
18
+ EXPOSE 7860
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
+ CMD ["python3", "app.py"]