File size: 1,057 Bytes
f62add2
5c85ac9
f62add2
ffddcd3
 
 
f62add2
 
5c85ac9
ffddcd3
f62add2
 
ffddcd3
f62add2
 
5c85ac9
ffddcd3
5c85ac9
ffddcd3
f62add2
 
 
5c85ac9
 
ffddcd3
 
5c85ac9
ffddcd3
 
5c85ac9
f62add2
 
5c85ac9
ffddcd3
 
5c85ac9
ffddcd3
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
34
35
36
37
# ============================================
# Dockerfile for MobSF (API-Only Mode, fixed)
# ============================================

FROM python:3.10-slim

ENV DEBIAN_FRONTEND=noninteractive

# Install system dependencies
RUN apt update && apt install -y \
    openjdk-17-jdk-headless \
    git curl unzip \
    libxml2-dev libxslt-dev \
    zlib1g-dev python3-dev \
    build-essential libffi-dev \
    && apt clean && rm -rf /var/lib/apt/lists/*

# Set working dir
WORKDIR /app

# Clone MobSF
RUN git clone --depth=1 https://github.com/MobSF/Mobile-Security-Framework-MobSF.git mobsf

# Set working dir ke dalam folder MobSF
WORKDIR /app/mobsf

# Install Python dependencies (setelah clone & sudah di direktori yang benar)
RUN pip install --upgrade pip && pip install -r requirements.txt

# Nonaktifkan Celery supaya nggak error di environment headless
RUN sed -i 's/USE_CELERY = True/USE_CELERY = False/' mobsf/settings.py

# Expose port REST API MobSF
EXPOSE 8000

# Jalankan backend API
CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"]