forked from python-pillow/docker-images
/
Dockerfile
45 lines (39 loc) · 1.46 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This is a sample Dockerfile to build Pillow on Alpine Linux
# with all/most of the dependencies working.
#
# Tcl/Tk isn't detecting
# Freetype has different metrics so tests are failing.
# sudo and bash are required for the webp build script.
FROM alpine
RUN apk --no-cache add python3 \
build-base \
python3-dev \
# wget dependency
openssl \
# dev dependencies
git \
bash \
sudo \
py3-pip \
# Pillow dependencies
jpeg-dev \
zlib-dev \
freetype-dev \
lcms2-dev \
openjpeg-dev \
tiff-dev \
tk-dev \
tcl-dev \
harfbuzz-dev \
fribidi-dev
ADD depends /depends
RUN cd /depends && ./install_webp.sh && ./install_imagequant.sh && ./install_raqm.sh
RUN /usr/sbin/adduser -D pillow && \
pip3 install virtualenv && virtualenv /vpy3 && \
/vpy3/bin/pip install --upgrade pip && \
/vpy3/bin/pip install olefile pytest pytest-cov && \
/vpy3/bin/pip install numpy --only-binary=:all: || true && \
chown -R pillow:pillow /vpy3
USER pillow
CMD ["depends/test.sh"]
#docker run -v $TRAVIS_BUILD_DIR:/Pillow pillow-alpine