worawit / blutter

Flutter Mobile Application Reverse Engineering Tool
MIT License
752 stars 128 forks source link

add: Docker support #50

Open alright21 opened 3 months ago

alright21 commented 3 months ago

Docker support allows user to install and use blutter without dependency or OS issues.

trufae commented 1 month ago

Here's my docker-blutter thing in case it can be useful for someone. sadly using blutter without docker is kind of not possible https://github.com/trufae/blutter-docker

cryptax commented 1 month ago

I think that this Dockerfile would be slimmer:

FROM debian:trixie-slim

RUN DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -yqq python3-pyelftools python3-requests git cmake ninja-build build-essential pkg-config libicu-dev libcapstone-dev bash git unzip \
    && rm -rf /var/lib/apt/lists/*

RUN mkdir -p /workdir \ 
     && git clone https://github.com/worawit/blutter
WORKDIR /workdir
ENTRYPOINT ["/bin/bash"]

and I use it with a docker-compose.yml file:

---
services:
  blutter:
    build:
      context: .
      dockerfile: Dockerfile
    image: cryptax/blutter:2024.05
    container_name: blutter
    volumes:
      - /tmp/blutter:/workdir

The commands are then: docker compose build to build, and docker compose run blutter to run and connect to the container.

alright21 commented 1 month ago

Hi @cryptax, your solution is quite more compact:) In your case you run blutter after connecting with the container and you put the .so file directly inside the blutter repo, am I right? I was also trying to find the best option to run the command, in my case I let the container run directly blutter with the volumes paths

cryptax commented 3 weeks ago

Hi @cryptax, your solution is quite more compact:) In your case you run blutter after connecting with the container and you put the .so file directly inside the blutter repo, am I right? I was also trying to find the best option to run the command, in my case I let the container run directly blutter with the volumes paths

Yes, I run the container with docker compose run blutter and I drop the arm64- library directory in /tmp/blutter on my host, which shares it with the container. Then, inside the container, I run blutter on that directory and usually, I write the output to the shared directory too.