Pillow/depends/alpine_Dockerfile

44 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2016-05-30 16:51:45 +03:00
# This is a sample Dockerfile to build Pillow on Alpine Linux
# with all/most of the dependencies working.
#
# Tcl/Tk isn't detecting
2016-06-17 13:03:21 +03:00
# Freetype has different metrics so tests are failing.
# sudo and bash are required for the webp build script.
2016-05-30 16:51:45 +03:00
FROM alpine
USER root
RUN apk --no-cache add python \
build-base \
python-dev \
py-pip \
# Pillow depenencies
jpeg-dev \
zlib-dev \
freetype-dev \
lcms2-dev \
openjpeg-dev \
tiff-dev \
tk-dev \
tcl-dev
# install from pip, without webp
#RUN LIBRARY_PATH=/lib:/usr/lib /bin/sh -c "pip install Pillow"
# install from git, run tests, including webp
RUN apk --no-cache add git \
bash \
2016-06-17 13:03:21 +03:00
sudo
2016-09-03 05:23:42 +03:00
RUN git clone https://github.com/python-pillow/Pillow.git /Pillow
2016-05-30 16:51:45 +03:00
RUN pip install virtualenv && virtualenv /vpy && source /vpy/bin/activate && pip install nose
RUN echo "#!/bin/bash" >> /test && \
echo "source /vpy/bin/activate && cd /Pillow " >> test && \
2016-05-30 17:18:23 +03:00
echo "pushd depends && ./install_webp.sh && ./install_imagequant.sh && popd" >> test && \
2016-05-30 16:51:45 +03:00
echo "LIBRARY_PATH=/lib:/usr/lib make install && make test" >> test
RUN chmod +x /test
CMD ["/test"]