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