1# Copyright 2019 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-rust 18RUN apt-get update && apt-get install -y build-essential autoconf automake libtool make pkg-config python flex bison zlib1g-dev libpcre3-dev cmake tshark 19 20# TODO libmagic, liblzma and other optional libraries 21ADD https://ftp.pcre.org/pub/pcre/pcre2-10.36.tar.gz pcre2-10.36.tar.gz 22ADD https://www.tcpdump.org/release/libpcap-1.9.1.tar.gz libpcap-1.9.1.tar.gz 23ADD http://www.digip.org/jansson/releases/jansson-2.12.tar.gz jansson-2.12.tar.gz 24RUN git clone --depth=1 https://github.com/yaml/libyaml 25ADD https://github.com/lz4/lz4/archive/v1.9.2.tar.gz lz4-1.9.2.tar.gz 26RUN git clone --depth=1 https://github.com/catenacyber/fuzzpcap 27 28ADD https://rules.emergingthreats.net/open/suricata/emerging.rules.zip emerging.rules.zip 29 30RUN cargo install --force cbindgen 31 32RUN git clone --depth 1 https://github.com/OISF/suricata.git suricata 33RUN git clone --depth 1 https://github.com/OISF/libhtp.git libhtp 34RUN git clone --depth 1 https://github.com/OISF/suricata-verify suricata-verify 35WORKDIR $SRC 36COPY build.sh $SRC/ 37