radare/radare2

By radare

โ€ขUpdated 24 days ago

UNIX-like reverse engineering framework and command-line toolset

Image
26

500K+

radare/radare2 repository overview

โ radare2 docker image

Radare2 (also known as r2) is a complete framework for reverse-engineering and analyzing binaries; composed of a set of small utilities that can be used together or independently from the command line. Built around a disassembler for computer software which generates assembly language source code from machine-executable code, it supports a variety of executable formats for different processors and operating systems. Apart from the static analysis feature it also supports debugging and emulation. The architecture of the framework is modular and allows to use existing or create new plugins for new file formats, architectures, analysis features.

โ Official stable version

This registry image is for the stable version is based on Ubuntu and the radare2 snapโ  build. The Dockerfile used to build it can be found in this dedicated repositoryโ . Any issue found in this packaging can be opened thereโ .

The resulting build includes the following projects:

โ Run

To use this docker image you can use either:

docker run -ti radare/radare2
podman run -ti docker.io/radare/radare2
nerdctl run -ti radare/radare2

To use the docker image as one shot so it removes everything inside the container on exit just add --rm as follows:

docker run --rm -ti radare/radare2

Another example to use for debugging inside the docker:

docker run --tty --interactive --privileged --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --security-opt apparmor=unconfined radare/radare2

Also there is the option to open the r2bookโ  inside the container:

info r2book
โ Verify

The image can be verified that has been generated by GitHub Actions by runing the following command:

cosign verify docker.io/radare/radare2 --experimental-oci11=true --certificate-oidc-issuer=https://token.actions.githubusercontent.com --certificate-identity-regexp='https://github\.com/radareorg/radare2-snap/.*@refs/heads/main'

โ GIT version (r2docker)

Alternatively there is a version with radare2 GIT aimed to be build locally.

This will build an image using Debian with radare2 from git with latest changes. The Dockerfile to build can be found inside the dist/docker directory in the radare2โ  source tree.

โ Build from GIT

To build this other image run the following lines:

git clone https://github.com/radareorg/radare2.git
cd radare2
make -C dist/docker

This will build an image with the following plugins:

It is possible to specify more packages using the R2PM make variable:

make -C dist/docker R2PM=radius2

Also, you can select the architecture (amd64 / arm64) to compile the image by using the ARCH make variable.

โ Run a container as r2web server

By default both images are intended to be used in a interactive terminal.

But both can also be launched directly to use the radare2 web UI.

The do so it can be launched using the following command:

docker run -p 9090:9090 radare/radare2 r2 -c '=h' -

Or the following docker-compose structure:

version: "3.8"
services:
  radare2:
    image: radare/radare2
    command: r2 -c '=h' -
    network_mode: bridge
    ports:
      - "9090:9090"

Or if debugging functionality is required:

version: "3.8"
services:
  radare2:
    image: radare/radare2
    command: r2 -c '=h' -
    network_mode: bridge
    ports:
      - "9090:9090"
    privileged: true
    cap_add:
      - SYS_PTRACE
    security_opt:
      - "seccomp=unconfined"
      - "apparmor=unconfined"

โ Run a container as MCP server

Claude Desktop Integration

In the Claude Desktop app, press CMD + , to open the Developer settings. Edit the configuration file and restart the client after editing the JSON file as explained below:

  1. Locate your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add the following to your configuration file:

{
  "mcpServers": {
    "radare2": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "-v", "/tmp/data:/data", "--entrypoint", "r2mcp", "radare/radare2"]
    }
  }
}
VS Code Integration

To use r2mcp with GitHub Copilot Chat in Visual Studio Code by adding it to your user configurationโ  (see also add an mcp server to vscodeโ ):

  1. Open the Command Palette with CMD + Shift + P (macOS) or Ctrl + Shift + P (Windows/Linux).
  2. Search for and select Copilot: Open User Configuration (typically found in ~/Library/Application Support/Code/User/mcp.json in macOS).
  3. Add the following to your configuration file:
{
  "servers": {
    "radare2": {
      "type": "stdio",
      "command": "docker",
      "args": ["run", "--rm", "-i", "-v", "/tmp/data:/data", "--entrypoint", "r2mcp", "radare/radare2"]
    }
  },
  "inputs": []
}
Zed Integration

You can use r2mcp with Zed as well by adding it to your configurationโ :

  1. Open the command palette: CMD + Shift + P (macOS) or Ctrl + Shift + P (Windows/Linux).1ยบ
  2. Search of agent: open configuration or search of settings.
  3. Add your server as such:
  "context_servers": {
    "r2-mcp-server": {
      "source": "custom",
      "command": "docker",
      "args": ["run", "--rm", "-i", "-v", "/tmp/data:/data", "--entrypoint", "r2mcp", "radare/radare2"],
      "env": {}
    }
  }

Note: you will need another LLM agent, such as Claude, Gemini or else to be able to use it.

You can read more about the project in the following links:

Tag summary

Content type

Image

Digest

sha256:b3469b4b5โ€ฆ

Size

237.1 MB

Last updated

24 days ago

docker pull radare/radare2:6.1.8