diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1ce248e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM ghcr.io/astral-sh/uv:python3.12-bookworm + +# Add the Debian testing repository to get GCC 13 +RUN echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list && \ + apt-get update && \ + apt-get install -y gcc-13 \ + g++-13 \ + git \ + cmake \ + ninja-build \ + build-essential \ + pkg-config \ + libicu-dev \ + libcapstone-dev && \ + apt-get clean && \ + uv pip install --system pyelftools requests && \ + # Set GCC 13 as the default compiler + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-13 + +COPY . /app +WORKDIR /app \ No newline at end of file diff --git a/README.md b/README.md index 8486a62..3bc1e78 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,23 @@ brew install llvm@16 cmake ninja pkg-config icu4c capstone pip3 install pyelftools requests ``` +### Docker + +You can also run Blutter from docker. First build the docker image. + +```sh +docker build -t blutter . +``` + +Then you can run it as follows: + +```sh +docker run -v /path/to/app/lib/arm64-v8a:/arm64-v8a -v /path/to/outdir:/app/outdir -t blutter:latest python3 blutter.py /arm64-v8a /outdir +``` +Where the first volume is the path to the lib directory of the apk and the second volume is the path to the output directory. + +This volume mounts the lib directory of the apk to the `/arm64-v8a` directory in the container and the output directory to the `/app/outdir` directory in the container. + ## Usage Extract "lib" directory from apk file ```