Skip to content

Instantly share code, notes, and snippets.

@Soyuzbek
Last active February 1, 2025 06:03
Show Gist options
  • Save Soyuzbek/bfe8a267c34e420495fe01d12e567640 to your computer and use it in GitHub Desktop.
Save Soyuzbek/bfe8a267c34e420495fe01d12e567640 to your computer and use it in GitHub Desktop.
Python alpine base image requirements for most needed python libraries
FROM python:latest-alpine
### dependencies on alpine image ###
#poetry installation/(runtime?) dependencies
RUN apk add gcc musl-dev libffi-dev
# Pillow installation dependencies
RUN apk add --no-cache jpeg-dev zlib-dev
# Pillow runtime dependencies
RUN apk add --no-cache freetype-dev \
fribidi-dev \
harfbuzz-dev \
lcms2-dev \
openjpeg-dev \
tcl-dev \
tiff-dev \
tk-dev
# needed to compile django.po locale files
RUN apk --no-cache add gettext
# psycopg2 installation dependencies
RUN apk --no-cache add postgresql-dev gcc python3-dev musl-dev
# psycopg2 runtime dependencies
RUN apk add libpq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment