Running Radare2 in Docker

October 19, 2016
radare docker

Let’s start with a docker-compose.yml file in our project root.

version: "2"

services:
    radare:
        image: remnux/radare2
        volumes:
            - ./bin:/home/nonroot/workdir
        command: "true"

command: "true" will shutdown the container if called with docker-compose up. We need an interactive session to use radare2.

Create a directory called bin inside your project root and place the binary you would like to analyize in that directory.

$ mkdir bin
$ cp ~/my_bin bin/

All we have to do now is to run the container.

$ docker-compose run --rm radare bash

And fire up r2 inside the container.

~/workdir$ r2 my_bin
 -- Nothing to see here. Move along.
[0x00404890]>