diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..202a909 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +# Use Ubuntu 23.10 as the base image +FROM ubuntu:23.10 + +# Update and upgrade the system +RUN apt-get update && \ + apt-get upgrade -y + +# Install necessary packages +RUN apt-get install -y \ + python3-pyelftools \ + python3-requests \ + git \ + cmake \ + ninja-build \ + build-essential \ + pkg-config \ + libicu-dev \ + libcapstone-dev + +# Clone the specified repository +RUN git clone https://github.com/worawit/blutter.git + +# Set the working directory to the cloned repository +WORKDIR /blutter + +# Entry point for running the specific command +ENTRYPOINT ["python3", "blutter.py"] + +# Default command arguments (can be overridden when running the container) +CMD ["/app/arm64-v8a", "/app/blutter_output"] diff --git a/README.md b/README.md index ce61747..94c33f4 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,12 @@ python scripts\init_env_win.py brew install llvm@16 cmake ninja pkg-config icu4c capstone pip3 install pyelftools requests ``` +### Docker +- Install Docker +- Build Docker image from Dockerfile +``` +sudo docker build -t blutter . +``` ## Usage Extract "lib" directory from apk file @@ -45,6 +51,16 @@ The blutter.py will automatically detect the Dart version from the flutter engin If the blutter executable for required Dart version does not exists, the script will automatically checkout Dart source code and compiling it. +### Docker +`cd` inside `lib` directory + +Run (`sudo` required to share and write to volumes) +``` +sudo docker run -it -v "$(pwd):/app" blutter +``` +The output will be in `lib/blutter_output` directory. + + ## Update You can use ```git pull``` to update and run blutter.py with ```--rebuild``` option to force rebuild the executable ```