Created
March 24, 2019 21:05
-
-
Save jlamendo/b013a8904032fb1600583ddc64714571 to your computer and use it in GitHub Desktop.
Dockerfile for googleprojectzero/fuzzilli
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:18.04 | |
RUN apt-get update\ | |
&& apt-get install -y wget xz-utils build-essential curl git subversion make g++ python chrpath libicu-dev lsb-release \ | |
&& apt-get clean\ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& curl -SL http://releases.llvm.org/7.0.1/clang+llvm-7.0.1-x86_64-linux-gnu-ubuntu-18.04.tar.xz | tar -xJC . \ | |
&& mv clang+llvm-7.0.1-x86_64-linux-gnu-ubuntu-18.04 /usr/share/clang_7.0.1 \ | |
&& echo 'export PATH="/usr/share/clang_7.0.1/bin:$PATH"' >> ~/.bashrc \ | |
&& echo 'export LD_LIBRARY_PATH="/usr/share/clang_7.0.1/lib:LD_LIBRARY_PATH"' >> ~/.bashrc\ | |
&& export LD_LIBRARY_PATH="/usr/share/clang_7.0.1/lib:LD_LIBRARY_PATH"\ | |
&& export PATH="/usr/share/clang_7.0.1/bin:$PATH"\ | |
&& wget https://swift.org/builds/swift-4.2.3-release/ubuntu1804/swift-4.2.3-RELEASE/swift-4.2.3-RELEASE-ubuntu18.04.tar.gz\ | |
&& tar xzf swift-4.2.3-RELEASE-ubuntu18.04.tar.gz\ | |
&& mv swift-4.2.3-RELEASE-ubuntu18.04 /usr/share/swift\ | |
&& echo 'export PATH="/usr/share/swift/usr/bin:$PATH"' >> ~/.bashrc\ | |
&& export PATH="/usr/share/swift/usr/bin:$PATH"\ | |
&& git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /usr/local/depot_tools\ | |
&& echo 'export PATH="$PATH:/usr/local/depot_tools"' >> ~/.bashrc\ | |
&& export PATH="$PATH:/usr/local/depot_tools"\ | |
&& mv /usr/bin/apt-get /usr/bin/apt-get-interactive\ | |
&& echo '#!/bin/bash\nenv DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get-interactive "$@"' > /usr/bin/apt-get\ | |
&& chmod +x /usr/bin/apt-get\ | |
&& apt-get update && apt-get install -y sudo\ | |
&& cd /usr/local/src\ | |
&& fetch v8\ | |
&& cd /usr/local/src/v8\ | |
&& git fetch\ | |
&& gclient sync\ | |
&& chmod +x /usr/local/src/v8/build/install-build-deps.sh\ | |
&& /usr/local/src/v8/build/install-build-deps.sh\ | |
&& git clone https://github.com/googleprojectzero/fuzzilli.git /opt/fuzzilli\ | |
&& cd /usr/local/src/v8\ | |
&& patch -p1 < /opt/fuzzilli/Targets/V8/v8.patch\ | |
&& chmod +x /opt/fuzzilli/Targets/V8/fuzzbuild.sh\ | |
&& /opt/fuzzilli/Targets/V8/fuzzbuild.sh\ | |
&& rm /usr/bin/apt-get \ | |
&& mv /usr/bin/apt-get-interactive /usr/bin/apt-get\ | |
&& cd /opt/fuzzilli\ | |
&& echo '#!/bin/bash\n\n. ~/.bashrc && cd /opt/fuzzilli && swift build -c release -Xlinker=''-lrt'' && swift run -Xlinker=''-lrt'' -c release FuzzilliCli "$@"' > /opt/fuzzilli/run.sh\ | |
&& chmod +x /opt/fuzzilli/run.sh | |
ENV PATH "/usr/share/clang_7.0.1/bin:${PATH}" | |
ENV LD_LIBRARY_PATH "/usr/share/clang_7.0.1/bin:${LD_LIBRARY_PATH}" | |
ENV PATH "${PATH}:/usr/local/depot_tools" | |
ENV PATH "/usr/share/swift/usr/bin:${PATH}" | |
WORKDIR "/opt/fuzzili" | |
VOLUME /data | |
ENTRYPOINT [ "/bin/bash", "-c", "/opt/fuzzilli/run.sh --storagePath=/data --profile=v8 --exportCorpus=true /usr/local/src/v8/out/fuzzbuild/d8"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment