1# Copyright 2021 Google LLC 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 && \ 19 apt-get -y install \ 20 libgflags-dev \ 21 libgoogle-glog-dev \ 22 libgtest-dev libssl-dev \ 23 make \ 24 curl 25 26# OpenSSL 27ARG OPENSSL_VERSION=1.1.1g 28ARG OPENSSL_HASH=ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46 29RUN set -ex \ 30 && curl -s -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz \ 31 && echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c \ 32 && tar -xzf openssl-${OPENSSL_VERSION}.tar.gz \ 33 && cd openssl-${OPENSSL_VERSION} \ 34 && ./Configure linux-x86_64 no-shared --static "$CFLAGS" \ 35 && make build_generated \ 36 && make libcrypto.a \ 37 && make install 38 39RUN git clone https://github.com/google/s2geometry 40WORKDIR $SRC/s2geometry 41COPY build.sh \ 42 s2_fuzzer.cc \ 43 $SRC/ 44