Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: Docker support #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```
Expand Down