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

add: Docker support #50

wants to merge 1 commit into from

Conversation

alright21
Copy link

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

  • Dockerfile creates the image with all the necessary dependencies. It is necessary to share a volume in order to write the resulting directory in the host machine. I also added default command arguments
  • README updated with installation instructions.

@trufae
Copy link

trufae commented May 27, 2024

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
Copy link

cryptax commented May 27, 2024

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
Copy link
Author

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
Copy link

cryptax commented Jun 7, 2024

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.

@heyhu
Copy link

heyhu commented Sep 4, 2024

太牛逼了哥们,完美解决问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants