|
| 1 | +# Originally from https://github.com/M0E-lnx/ubuntu-32bit with thanks, |
| 2 | +# and then https://github.com/matthew-brett/trusty/blob/32/Dockerfile |
| 3 | + |
| 4 | +FROM scratch |
| 5 | +ADD debian-trixie-amd64.tgz / |
| 6 | + |
| 7 | +# a few minor docker-specific tweaks |
| 8 | +# see https://github.com/docker/docker/blob/master/contrib/mkimage/debootstrap |
| 9 | +RUN echo '#!/bin/sh' > /usr/sbin/policy-rc.d \ |
| 10 | + && echo 'exit 101' >> /usr/sbin/policy-rc.d \ |
| 11 | + && chmod +x /usr/sbin/policy-rc.d \ |
| 12 | + \ |
| 13 | + && dpkg-divert --local --rename --add /sbin/initctl \ |
| 14 | + && cp -a /usr/sbin/policy-rc.d /sbin/initctl \ |
| 15 | + && sed -i 's/^exit.*/exit 0/' /sbin/initctl \ |
| 16 | + \ |
| 17 | + && echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup \ |
| 18 | + \ |
| 19 | + && echo 'DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' > /etc/apt/apt.conf.d/docker-clean \ |
| 20 | + && echo 'APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' >> /etc/apt/apt.conf.d/docker-clean \ |
| 21 | + && echo 'Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";' >> /etc/apt/apt.conf.d/docker-clean \ |
| 22 | + \ |
| 23 | + && echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/docker-no-languages \ |
| 24 | + \ |
| 25 | + && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/docker-gzip-indexes |
| 26 | + |
| 27 | +# && echo 'deb http://archive.ubuntu.com/ubuntu/ trusty universe' >> /etc/apt/sources.list \ |
| 28 | +# && echo 'deb http://archive.ubuntu.com/ubuntu/ trusty-updates universe' >> /etc/apt/sources.list |
| 29 | + |
| 30 | +# |
| 31 | +# Pillow customization |
| 32 | +# |
| 33 | + |
| 34 | +RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -y install \ |
| 35 | + cmake \ |
| 36 | + curl \ |
| 37 | + ghostscript \ |
| 38 | + git \ |
| 39 | + libfreetype6-dev \ |
| 40 | + libfribidi-dev \ |
| 41 | + libharfbuzz-dev \ |
| 42 | + libjpeg-turbo-progs \ |
| 43 | + libjpeg62-turbo-dev \ |
| 44 | + liblcms2-dev \ |
| 45 | + libopenjp2-7-dev \ |
| 46 | + libtiff5-dev \ |
| 47 | + libwebp-dev \ |
| 48 | + libssl-dev \ |
| 49 | + meson \ |
| 50 | + nasm \ |
| 51 | + netpbm \ |
| 52 | + python3-dev \ |
| 53 | + python3-numpy \ |
| 54 | + python3-setuptools \ |
| 55 | + python3-tk \ |
| 56 | + sudo \ |
| 57 | + tcl8.6-dev \ |
| 58 | + tk8.6-dev \ |
| 59 | + virtualenv \ |
| 60 | + wget \ |
| 61 | + xvfb \ |
| 62 | + zlib1g-dev \ |
| 63 | + && rm -rf /var/lib/apt/lists/* |
| 64 | + |
| 65 | +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
| 66 | +ENV PATH="/root/.cargo/bin:${PATH}" |
| 67 | + |
| 68 | +RUN useradd --uid 1001 pillow \ |
| 69 | + && mkdir /home/pillow \ |
| 70 | + && chown pillow:pillow /home/pillow |
| 71 | + |
| 72 | +ARG PIP_DISABLE_PIP_VERSION_CHECK=1 |
| 73 | +ARG PIP_NO_CACHE_DIR=1 |
| 74 | + |
| 75 | +RUN virtualenv -p /usr/bin/python3.13 --system-site-packages /vpy3 \ |
| 76 | + && /vpy3/bin/pip install --upgrade pip \ |
| 77 | + && /vpy3/bin/pip install olefile pytest pytest-cov pytest-timeout \ |
| 78 | + && chown -R pillow:pillow /vpy3 |
| 79 | + |
| 80 | +ADD depends /depends |
| 81 | +RUN cd /depends && ./install_imagequant.sh && ./install_libavif.sh && ./install_raqm.sh |
| 82 | + |
| 83 | +USER pillow |
| 84 | +CMD ["depends/test.sh"] |
| 85 | + |
| 86 | +#docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/debian-13-trixie-amd64 |
0 commit comments