emiogiwara commited on
Commit
5c85ac9
·
verified ·
1 Parent(s): f62add2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -9
Dockerfile CHANGED
@@ -1,36 +1,37 @@
1
  # ============================================
2
- # Dockerfile for MobSF (API-Only Mode, CLI Ready)
3
  # ============================================
4
 
5
  FROM python:3.10-slim
6
 
7
  ENV DEBIAN_FRONTEND=noninteractive
8
 
9
- # Install dependencies
10
  RUN apt update && apt install -y \
11
  openjdk-17-jdk-headless \
12
  git curl unzip \
13
  libxml2-dev libxslt-dev \
14
  zlib1g-dev python3-dev \
15
  build-essential libffi-dev \
16
- && apt clean \
17
- && rm -rf /var/lib/apt/lists/*
18
 
19
- # Set working directory
20
  WORKDIR /app
21
 
22
  # Clone MobSF
23
  RUN git clone --depth=1 https://github.com/MobSF/Mobile-Security-Framework-MobSF.git mobsf
 
 
24
  WORKDIR /app/mobsf
25
 
26
- # Install Python dependencies
27
  RUN pip install --upgrade pip && pip install -r requirements.txt
28
 
29
- # Disable Celery & update settings to headless safe
30
  RUN sed -i 's/USE_CELERY = True/USE_CELERY = False/' mobsf/settings.py
31
 
32
- # Expose API port
33
  EXPOSE 8000
34
 
35
- # Start MobSF (only backend, no GUI)
36
  CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"]
 
1
  # ============================================
2
+ # Dockerfile for MobSF (API-Only Mode, fixed)
3
  # ============================================
4
 
5
  FROM python:3.10-slim
6
 
7
  ENV DEBIAN_FRONTEND=noninteractive
8
 
9
+ # Install system dependencies
10
  RUN apt update && apt install -y \
11
  openjdk-17-jdk-headless \
12
  git curl unzip \
13
  libxml2-dev libxslt-dev \
14
  zlib1g-dev python3-dev \
15
  build-essential libffi-dev \
16
+ && apt clean && rm -rf /var/lib/apt/lists/*
 
17
 
18
+ # Set working dir
19
  WORKDIR /app
20
 
21
  # Clone MobSF
22
  RUN git clone --depth=1 https://github.com/MobSF/Mobile-Security-Framework-MobSF.git mobsf
23
+
24
+ # Set working dir ke dalam folder MobSF
25
  WORKDIR /app/mobsf
26
 
27
+ # Install Python dependencies (setelah clone & sudah di direktori yang benar)
28
  RUN pip install --upgrade pip && pip install -r requirements.txt
29
 
30
+ # Nonaktifkan Celery supaya nggak error di environment headless
31
  RUN sed -i 's/USE_CELERY = True/USE_CELERY = False/' mobsf/settings.py
32
 
33
+ # Expose port REST API MobSF
34
  EXPOSE 8000
35
 
36
+ # Jalankan backend API
37
  CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"]