Created
January 24, 2023 23:14
-
-
Save douglasmiranda/7f1fff594226492bb4f31632386058cc to your computer and use it in GitHub Desktop.
Python Pillow build on Alpine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.11-alpine3.17 | |
ENV PATH=$PATH:$HOMEAPP/.local/bin | |
ENV PYTHONPATH=$HOMEAPP:$PROJECT_NAME | |
# Python packages build dependencies | |
RUN apk add --no-cache --virtual .build-dependencies \ | |
# Essentials | |
gcc musl-dev openssl-dev openssl \ | |
# Pillow / PIL build dependencies | |
freetype-dev fribidi-dev harfbuzz-dev jpeg-dev lcms2-dev libimagequant-dev \ | |
openjpeg-dev tcl-dev tiff-dev tk-dev zlib-dev libxslt-dev libffi-dev \ | |
# Python packages run dependencies | |
&& apk add --no-cache \ | |
# Pillow / PIL | |
freetype jpeg libwebp tiff libpng lcms2 openjpeg zlib libxslt libxml2 libffi \ | |
fribidi harfbuzz libimagequant | |
RUN pip install Pillow==9.4.0 \ | |
&& rm -R /root/.cache/pip \ | |
&& apk del .build-dependencies |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment