1# Copyright 2018 Google Inc. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15################################################################################ 16 17FROM gcr.io/oss-fuzz-base/base-builder 18RUN apt-get update && apt-get install -y wget 19 20# Get Wuffs' first-party code. 21 22RUN git clone --depth 1 https://github.com/google/wuffs.git 23 24# Get third-party test corpora. 25 26RUN git clone --depth 1 https://github.com/nst/JSONTestSuite.git 27 28RUN wget -O bmpsuite.zip https://entropymine.com/jason/bmpsuite/releases/bmpsuite-2.6.zip 29RUN mkdir bmpsuite_corpus 30RUN unzip -j bmpsuite.zip -d bmpsuite_corpus 31RUN rm bmpsuite.zip 32 33RUN wget -O pngsuite.tgz http://www.schaik.com/pngsuite/PngSuite-2017jul19.tgz 34RUN mkdir pngsuite_corpus 35RUN tar xf pngsuite.tgz --one-top-level=pngsuite_corpus 36RUN rm pngsuite.tgz 37 38RUN wget -O rapidjson.zip "https://github.com/guidovranken/rapidjson-fuzzers/blob/master/fuzzer_seed_corpus.zip?raw=true" 39RUN mkdir rapidjson_corpus 40RUN unzip -j rapidjson.zip -d rapidjson_corpus 41RUN rm rapidjson.zip 42 43RUN git clone --depth 1 https://github.com/minio/simdjson-fuzz 44RUN mv simdjson-fuzz/corpus/corpus simdjson_corpus 45RUN rm -rf simdjson-fuzz 46 47# Finish. 48 49WORKDIR wuffs 50COPY build.sh $SRC/ 51