-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
60 lines (48 loc) · 1.73 KB
/
Dockerfile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# syntax=docker/dockerfile:latest
ARG VERSION=focal
ARG CMDLINE_TOOLS_URL=https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
FROM ubuntu:$VERSION as recorder
ARG CMDLINE_TOOLS_URL
# Enable APT package caching
RUN rm -f /etc/apt/apt.conf.d/docker-clean && \
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
ENV TZ=Europe/Zurich
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install base packages
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
make \
unzip \
zip \
git \
python3-minimal \
python3-pip \
python3-venv \
python3-dev \
python3-setuptools \
python3-clang-10 \
android-tools-adb \
android-tools-fastboot \
curl \
protobuf-compiler \
openjdk-11-jdk-headless \
graphviz \
wget
WORKDIR /root
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get install -y nodejs && \
npm install [email protected]
WORKDIR /src
RUN --mount=type=bind,source=src,target=/src \
--mount=type=cache,target=/root/.cache/pip,sharing=locked \
pip3 install -r requirements.txt
COPY docker/frida-server-14.2.7-android-arm64 /root/frida-server
WORKDIR /root/sdk
ADD --link $CMDLINE_TOOLS_URL /root/sdk/commandlinetools.zip
RUN unzip commandlinetools.zip
ENV PATH="$PATH:/root/sdk/cmdline-tools/bin"
RUN yes | sdkmanager --sdk_root=/root/sdk --install "build-tools;30.0.3"
ENV PATH="$PATH:/root/sdk/build-tools/30.0.3"