1# Copyright 2020 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 git clone --depth 1 https://github.com/google/fuzzing 19RUN cat fuzzing/dictionaries/bmp.dict \ 20 fuzzing/dictionaries/dds.dict \ 21 fuzzing/dictionaries/gif.dict \ 22 fuzzing/dictionaries/icns.dict \ 23 fuzzing/dictionaries/jpeg.dict \ 24 fuzzing/dictionaries/jpeg2000.dict \ 25 fuzzing/dictionaries/pbm.dict \ 26 fuzzing/dictionaries/png.dict \ 27 fuzzing/dictionaries/psd.dict \ 28 fuzzing/dictionaries/tiff.dict \ 29 fuzzing/dictionaries/webp.dict \ 30 > $OUT/fuzz_pillow.dict 31 32# library build dependencies 33RUN apt-get update && \ 34 apt-get install -y \ 35 libxau-dev \ 36 pkg-config \ 37 rsync \ 38 zlib1g-dev 39 40RUN git clone --depth 1 https://github.com/python-pillow/Pillow 41RUN git clone --depth 1 https://github.com/python-pillow/pillow-wheels 42 43COPY build_depends.sh $SRC 44 45RUN ln -s /usr/local/bin/python3 /usr/local/bin/python \ 46 && ln -s /bin/true /usr/local/bin/yum_install \ 47 && ln -s /bin/true /usr/local/bin/yum \ 48 && cd $SRC/pillow-wheels \ 49 && git submodule update --init multibuild \ 50 && bash $SRC/build_depends.sh 51 52# install extra test images for a better starting corpus 53RUN cd Pillow && depends/install_extra_test_images.sh 54 55COPY build.sh $SRC/ 56 57# pillow optional runtime dependencies 58RUN apt-get install -y \ 59 python3-tk \ 60 tcl8.6-dev \ 61 tk8.6-dev 62 63WORKDIR $SRC/Pillow 64