2018-06-25 09:43:59 +00:00
|
|
|
FROM ubuntu:rolling
|
|
|
|
LABEL maintainer "pschmied <ps1337@mailbox.org>"
|
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get -y install \
|
2018-06-30 11:50:05 +00:00
|
|
|
cmake \
|
|
|
|
curl \
|
|
|
|
g++ \
|
|
|
|
gcc \
|
|
|
|
git-core \
|
|
|
|
gosu \
|
|
|
|
libqt5svg5-dev \
|
|
|
|
make \
|
|
|
|
pkg-config \
|
|
|
|
python3 \
|
|
|
|
python3-dev \
|
|
|
|
qtbase5-dev \
|
|
|
|
qtwebengine5-dev \
|
|
|
|
unzip \
|
|
|
|
wget
|
2018-06-25 09:43:59 +00:00
|
|
|
|
|
|
|
# Get latest cutter release
|
|
|
|
WORKDIR /opt
|
|
|
|
RUN curl https://api.github.com/repos/radareorg/cutter/releases/latest | \
|
|
|
|
grep "zipball_url" | \
|
|
|
|
tr -d ",\" " | \
|
|
|
|
cut -d ":" -f 2,3 | \
|
|
|
|
wget -O cutter.zip -i - && \
|
|
|
|
unzip cutter.zip && \
|
|
|
|
rm cutter.zip && \
|
|
|
|
mv radareorg-cutter* cutter
|
|
|
|
|
|
|
|
# Get latest radare2 release and build it
|
|
|
|
WORKDIR /opt/cutter
|
|
|
|
RUN rm -rf radare2 && \
|
|
|
|
curl https://api.github.com/repos/radare/radare2/releases/latest | \
|
|
|
|
grep "zipball_url" | \
|
|
|
|
tr -d ",\" " | \
|
|
|
|
cut -d ":" -f 2,3 | \
|
|
|
|
wget -O radare2.zip -i - && \
|
|
|
|
unzip radare2.zip && \
|
|
|
|
rm radare2.zip && \
|
2018-06-30 11:50:05 +00:00
|
|
|
mv radare-radare2* radare2 && \
|
|
|
|
cd radare2 && ./sys/install.sh
|
2018-06-25 09:43:59 +00:00
|
|
|
|
|
|
|
# Build cutter
|
|
|
|
RUN mkdir build
|
|
|
|
WORKDIR /opt/cutter/build
|
2018-06-30 11:50:05 +00:00
|
|
|
RUN cmake ../src && \
|
|
|
|
make
|
2018-06-25 09:43:59 +00:00
|
|
|
|
|
|
|
# Add r2 user
|
|
|
|
RUN useradd r2
|
|
|
|
|
2018-06-30 11:50:05 +00:00
|
|
|
# Prepare files to mount configurations later on
|
|
|
|
RUN mkdir /var/sharedFolder && \
|
|
|
|
mkdir -p /home/r2/.config/radare2 && \
|
|
|
|
touch /home/r2/.radare2rc
|
2018-06-25 09:43:59 +00:00
|
|
|
|
2018-06-30 11:50:05 +00:00
|
|
|
RUN chown -R r2:r2 /var/sharedFolder && \
|
|
|
|
chown -R r2:r2 /home/r2/
|
2018-06-25 09:43:59 +00:00
|
|
|
|
2018-06-30 11:50:05 +00:00
|
|
|
WORKDIR /home/r2
|
|
|
|
ADD entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|