Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:
tag: "3.10"
- context: "python3.11"
tag: "3.11"
- context: "python3.12"
tag: "3.12"

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -132,6 +134,8 @@ jobs:
tag: 3.10-pillow
- context: pillow/3.11
tag: 3.11-pillow
- context: pillow/3.12
tag: 3.12-pillow
- context: pillow/all
tag: all-pillow

Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ images: build-base \
build-pillow-3.9 \
build-pillow-3.10 \
build-pillow-3.11 \
build-pillow-3.12 \
build-ipython \
build-black \
build-certbot \
Expand Down Expand Up @@ -43,6 +44,9 @@ build-python-3.10:
build-python-3.11:
$(call build,python3.11,3.11)

build-python-3.12:
$(call build,python3.12,3.12)

build-pillow-all:
$(call build,all-pillow,all-pillow)

Expand All @@ -61,6 +65,9 @@ build-pillow-3.10:
build-pillow-3.11:
$(call build,3.11-pillow,3.11-pillow)

build-pillow-3.12:
$(call build,3.12-pillow,3.12-pillow)

build-black:
$(call build,black,app/black)

Expand Down Expand Up @@ -88,8 +95,10 @@ publish:
$(call publish,3.9)
$(call publish,3.10)
$(call publish,3.11)
$(call publish,3.12)
$(call publish,3.7-pillow)
$(call publish,3.8-pillow)
$(call publish,3.9-pillow)
$(call publish,3.10-pillow)
$(call publish,3.11-pillow)
$(call publish,3.12-pillow)
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ This project is available both in the official docker repository and also on the
------- | ---------
[`ghcr.io/snakepacker/python/all`](https://github.com/orgs/snakepacker/packages/container/package/python%2Fall) | [`snakepacker/python:all`](https://hub.docker.com/r/snakepacker/python/tags?page=1&name=all)
[`ghcr.io/snakepacker/python/all-pillow`](https://github.com/orgs/snakepacker/packages/container/package/python%2Fall-pillow) | [`snakepacker/python:all-pillow`](https://hub.docker.com/r/snakepacker/python/tags?page=1&name=all-pillow)
[`ghcr.io/snakepacker/python/3.12`](https://github.com/orgs/snakepacker/packages/container/package/python%2F3.12) | [`snakepacker/python:3.12`](https://hub.docker.com/r/snakepacker/python/tags?page=1&name=3.12)
[`ghcr.io/snakepacker/python/3.12-pillow`](https://github.com/orgs/snakepacker/packages/container/package/python%2F3.12-pillow) | [`snakepacker/python:3.12-pillow`](https://hub.docker.com/r/snakepacker/python/tags?page=1&name=3.12-pillow)
[`ghcr.io/snakepacker/python/3.11`](https://github.com/orgs/snakepacker/packages/container/package/python%2F3.11) | [`snakepacker/python:3.11`](https://hub.docker.com/r/snakepacker/python/tags?page=1&name=3.11)
[`ghcr.io/snakepacker/python/3.11-pillow`](https://github.com/orgs/snakepacker/packages/container/package/python%2F3.11-pillow) | [`snakepacker/python:3.11-pillow`](https://hub.docker.com/r/snakepacker/python/tags?page=1&name=3.11-pillow)
[`ghcr.io/snakepacker/python/3.10`](https://github.com/orgs/snakepacker/packages/container/package/python%2F3.10) | [`snakepacker/python:3.10`](https://hub.docker.com/r/snakepacker/python/tags?page=1&name=3.10)
Expand Down Expand Up @@ -47,11 +49,13 @@ Tag | Info | Purpose | Features
------- | ---- | ------- | --------
all | ![](https://flat.badgen.net/docker/size/snakepacker/python/all/amd64?label=size) | build stage | all available python versions, libpython headers and compiler
all-pillow | ![](https://flat.badgen.net/docker/size/snakepacker/python/all-pillow/amd64?label=size) | build stage | all available python versions, libpython headers, graphics libraries headers and compiler
[3.12](https://docs.python.org/3/whatsnew/3.12.html) | ![](https://flat.badgen.net/docker/size/snakepacker/python/3.12/amd64?label=size) | target stage | pure python 3.12
[3.11](https://docs.python.org/3/whatsnew/3.11.html) | ![](https://flat.badgen.net/docker/size/snakepacker/python/3.11/amd64?label=size) | target stage | pure python 3.11
[3.10](https://docs.python.org/3/whatsnew/3.10.html) | ![](https://flat.badgen.net/docker/size/snakepacker/python/3.10/amd64?label=size) | target stage | pure python 3.10
[3.9](https://docs.python.org/3/whatsnew/3.9.html) | ![](https://flat.badgen.net/docker/size/snakepacker/python/3.9/amd64?label=size) | target stage | pure python 3.9
[3.8](https://docs.python.org/3/whatsnew/3.8.html) | ![](https://flat.badgen.net/docker/size/snakepacker/python/3.8/amd64?label=size) | target stage | pure python 3.8
[3.7](https://docs.python.org/3/whatsnew/3.7.html) | ![](https://flat.badgen.net/docker/size/snakepacker/python/3.7/amd64?label=size) | target stage | pure python 3.7
[3.12-pillow](https://docs.python.org/3/whatsnew/3.12.html) | ![](https://flat.badgen.net/docker/size/snakepacker/python/3.12-pillow/amd64?label=size) | target stage | pure python 3.12 with graphics libraries binaries
[3.11-pillow](https://docs.python.org/3/whatsnew/3.11.html) | ![](https://flat.badgen.net/docker/size/snakepacker/python/3.11-pillow/amd64?label=size) | target stage | pure python 3.11 with graphics libraries binaries
[3.10-pillow](https://docs.python.org/3/whatsnew/3.10.html) | ![](https://flat.badgen.net/docker/size/snakepacker/python/3.10-pillow/amd64?label=size) | target stage | pure python 3.10 with graphics libraries binaries
[3.9-pillow](https://docs.python.org/3/whatsnew/3.9.html) | ![](https://flat.badgen.net/docker/size/snakepacker/python/3.9-pillow/amd64?label=size) | target stage | pure python 3.9 with graphics libraries binaries
Expand Down
4 changes: 3 additions & 1 deletion all/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ RUN apt-install -y python3.8 python3.8-dev python3.8-venv
RUN apt-install -y python3.9 python3.9-dev python3.9-venv
RUN apt-install -y python3.10 python3.10-dev python3.10-venv python3.10-distutils
RUN apt-install -y python3.11 python3.11-dev python3.11-venv python3.11-distutils
RUN apt-install -y python3.12 python3.12-dev python3.12-venv python3.12-distutils

RUN apt-install \
cargo \
Expand All @@ -41,7 +42,8 @@ RUN \
python3.8 /usr/share/python/get-pip.py "pip == 21.2.4" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.9 /usr/share/python/get-pip.py "pip == 21.2.4" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.10 /usr/share/python/get-pip.py "pip == 21.2.4" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.11 /usr/share/python/get-pip.py "pip == 21.2.4" "setuptools < 60" "wheel == 0.37.0" "cython"
python3.11 /usr/share/python/get-pip.py "pip == 21.2.4" "setuptools < 60" "wheel == 0.37.0" "cython" && \
python3.12 /usr/share/python/get-pip.py "pip == 21.2.4" "setuptools < 60" "wheel == 0.37.0" "cython"

# Upgrade preinstalled wheels
RUN rm -fr \
Expand Down
30 changes: 30 additions & 0 deletions pillow/3.12/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ghcr.io/snakepacker/python/all as builder

# https://pillow.readthedocs.io/en/stable/installation.html#building-from-source
RUN apt-install \
libfreetype6-dev \
libfribidi-dev \
libgif-dev \
libharfbuzz-dev \
libimagequant-dev \
libjpeg-dev \
libjpeg8-dev \
liblcms2-dev \
libopenjp2-7-dev \
libpng-dev \
libraqm-dev \
libtiff-dev \
libtiff5-dev \
libwebp-dev \
libxcb1-dev \
zlib1g-dev

RUN python3 -m venv /var/tmp/pillow-venv
RUN /var/tmp/pillow-venv/bin/pip install --no-binary=:all: pillow
RUN find-libdeps /var/tmp/pillow-venv > /usr/share/python3/pillow-runtime-libs.txt

############################################################################

FROM ghcr.io/snakepacker/python/3.12
COPY --from=builder /usr/share/python3/pillow-runtime-libs.txt /usr/share/python3/pillow-runtime-libs.txt
RUN xargs -ra /usr/share/python3/pillow-runtime-libs.txt apt-install
4 changes: 4 additions & 0 deletions python3.12/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM ghcr.io/snakepacker/python/base

# Install python
RUN apt-install python3.12-minimal libpython3.12-stdlib python3.12-distutils