Created
January 6, 2017 15:34
-
-
Save allanlw/352eba96c052ed1ca5b89adae646a581 to your computer and use it in GitHub Desktop.
Secretgrind Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
# Ubuntu 14.04 is used instead of 16.04, because 16.04 has too new a version of GCC | |
# and valgrind configure complains | |
# automake is needed for aclocal to build the valgrind code | |
# wget and git for fetching source | |
# python is required for building capstone | |
RUN apt-get update && apt-get -y install \ | |
build-essential \ | |
git \ | |
wget \ | |
autotools-dev \ | |
automake \ | |
python | |
RUN mkdir -p /secretgrind/source /secretgrind/prefix | |
WORKDIR /secretgrind/source | |
RUN wget valgrind.org/downloads/valgrind-3.10.1.tar.bz2 && \ | |
tar jxf valgrind-3.10.1.tar.bz2 && \ | |
rm -f valgrind-3.10.1.tar.bz2 && \ | |
mv valgrind-3.10.1 valgrind | |
WORKDIR /secretgrind/source/valgrind | |
RUN git clone https://github.com/lmrs2/secretgrind.git && \ | |
git -C secretgrind checkout d20b1e6a07b07a51e9275c934e7b652fcfe3ec91 | |
WORKDIR /secretgrind/source/valgrind/secretgrind | |
RUN wget https://github.com/aquynh/capstone/archive/3.0.4.tar.gz -O capstone.tar.gz && \ | |
tar zxf capstone.tar.gz && \ | |
rm -f capstone.tar.gz | |
RUN sh configure_valgrind.sh && \ | |
cd .. && \ | |
./autogen.sh && \ | |
./configure --prefix=/secretgrind/prefix && \ | |
make -j $(nproc) && \ | |
make install | |
RUN sh configure_capstone.sh /secretgrind/prefix && \ | |
cd capstone-3.0.4 && \ | |
sh make_capstone.sh | |
RUN ../autogen.sh && \ | |
./configure --prefix=/secretgrind/prefix && \ | |
make -j $(nproc) && \ | |
make install | |
RUN echo 'export PATH=$PATH:/secretgrind/prefix/bin && alias secretgrind="/secretgrind/prefix/bin/valgrind --tool=secretgrind"' >> /etc/profile | |
WORKDIR /secretgrind/ | |
ENTRYPOINT bash -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment