From d35d951c14c2a0fb355474f6265ae92660bde18f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Tue, 14 Jan 2025 18:00:18 +0100 Subject: [PATCH] Alpine 3.21 Images --- Dockerfile-alpine.template | 4 +- .../Dockerfile_22.13.0-0.12.6-full | 210 +++++++++++++++++ .../Dockerfile_22.13.0-0.12.6-small | 208 +++++++++++++++++ .../Dockerfile_3.13.1-0.12.6-full | 210 +++++++++++++++++ .../Dockerfile_3.13.1-0.12.6-small | 208 +++++++++++++++++ .../Dockerfile_3.21.2-0.12.6-full | 211 ++++++++++++++++++ .../Dockerfile_3.21.2-0.12.6-small | 209 +++++++++++++++++ update.sh | 10 +- 8 files changed, 1263 insertions(+), 7 deletions(-) create mode 100644 archive/alpine-node-wkhtmltopdf/Dockerfile_22.13.0-0.12.6-full create mode 100644 archive/alpine-node-wkhtmltopdf/Dockerfile_22.13.0-0.12.6-small create mode 100644 archive/alpine-python-wkhtmltopdf/Dockerfile_3.13.1-0.12.6-full create mode 100644 archive/alpine-python-wkhtmltopdf/Dockerfile_3.13.1-0.12.6-small create mode 100644 archive/alpine-wkhtmltopdf/Dockerfile_3.21.2-0.12.6-full create mode 100644 archive/alpine-wkhtmltopdf/Dockerfile_3.21.2-0.12.6-small diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 4a6f8a3..957ac64 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -28,8 +28,8 @@ RUN apk add --no-cache \ && apk add --no-cache --virtual .build-deps \ g++=8.3.0-r0 \ git \ - gtk+ \ - gtk+-dev \ + gtk+2.0 \ + gtk+2.0-dev \ make \ mesa-dev \ msttcorefonts-installer \ diff --git a/archive/alpine-node-wkhtmltopdf/Dockerfile_22.13.0-0.12.6-full b/archive/alpine-node-wkhtmltopdf/Dockerfile_22.13.0-0.12.6-full new file mode 100644 index 0000000..47ddff1 --- /dev/null +++ b/archive/alpine-node-wkhtmltopdf/Dockerfile_22.13.0-0.12.6-full @@ -0,0 +1,210 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +# Image +FROM alpine:3.21 AS builder + +# Environment variables +ENV WKHTMLTOX_VERSION=0.12.6 + +# Copy patches +RUN mkdir -p /tmp/patches +COPY conf/* /tmp/patches/ + +# Alpine 3.11 and higher versions have libstdc++ and g++ v9+ in their repositories which breaks the build +RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.10/main' >> /etc/apk/repositories + +# Install needed packages +RUN apk add --no-cache \ + libstdc++=8.3.0-r0 \ + libx11 \ + libxrender \ + libxext \ + libssl3 \ + ca-certificates \ + fontconfig \ + freetype \ + ttf-dejavu \ + ttf-droid \ + ttf-freefont \ + ttf-liberation \ +&& apk add --no-cache --virtual .build-deps \ + g++=8.3.0-r0 \ + git \ + gtk+2.0 \ + gtk+2.0-dev \ + make \ + mesa-dev \ + msttcorefonts-installer \ + openssl-dev \ + patch \ + fontconfig-dev \ + freetype-dev \ +\ +# Install microsoft fonts +&& update-ms-fonts \ +&& fc-cache -f \ +\ +# Download source files +&& git clone --recursive https://github.com/wkhtmltopdf/wkhtmltopdf.git /tmp/wkhtmltopdf \ +&& cd /tmp/wkhtmltopdf \ +&& git checkout tags/$WKHTMLTOX_VERSION \ +\ +# Apply patches +&& cd /tmp/wkhtmltopdf/qt \ +&& patch -p1 -i /tmp/patches/qt-musl.patch \ +&& patch -p1 -i /tmp/patches/qt-musl-iconv-no-bom.patch \ +&& patch -p1 -i /tmp/patches/qt-recursive-global-mutex.patch \ +&& patch -p1 -i /tmp/patches/qt-gcc6.patch \ +\ +# Modify qmake config +&& sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf \ +&& sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf \ +&& sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf \ +\ +# Prepare optimal build settings +&& NB_CORES=$(grep -c '^processor' /proc/cpuinfo) \ +\ +# Install qt +&& ./configure -confirm-license -opensource \ + -prefix /usr \ + -datadir /usr/share/qt \ + -sysconfdir /etc \ + -plugindir /usr/lib/qt/plugins \ + -importdir /usr/lib/qt/imports \ + -silent \ + -release \ + -static \ + -webkit \ + -script \ + -svg \ + -exceptions \ + -xmlpatterns \ + -openssl-linked \ + -no-fast \ + -no-largefile \ + -no-accessibility \ + -no-stl \ + -no-sql-ibase \ + -no-sql-mysql \ + -no-sql-odbc \ + -no-sql-psql \ + -no-sql-sqlite \ + -no-sql-sqlite2 \ + -no-qt3support \ + -no-opengl \ + -no-openvg \ + -no-system-proxies \ + -no-multimedia \ + -no-audio-backend \ + -no-phonon \ + -no-phonon-backend \ + -no-javascript-jit \ + -no-scripttools \ + -no-declarative \ + -no-declarative-debug \ + -no-mmx \ + -no-3dnow \ + -no-sse \ + -no-sse2 \ + -no-sse3 \ + -no-ssse3 \ + -no-sse4.1 \ + -no-sse4.2 \ + -no-avx \ + -no-neon \ + -no-rpath \ + -no-nis \ + -no-cups \ + -no-pch \ + -no-dbus \ + -no-separate-debug-info \ + -no-gtkstyle \ + -no-nas-sound \ + -no-opengl \ + -no-openvg \ + -no-sm \ + -no-xshape \ + -no-xvideo \ + -no-xsync \ + -no-xinerama \ + -no-xcursor \ + -no-xfixes \ + -no-xrandr \ + -no-mitshm \ + -no-xinput \ + -no-xkb \ + -no-glib \ + -no-icu \ + -nomake demos \ + -nomake docs \ + -nomake examples \ + -nomake tools \ + -nomake tests \ + -nomake translations \ + -graphicssystem raster \ + -qt-zlib \ + -qt-libpng \ + -qt-libmng \ + -qt-libtiff \ + -qt-libjpeg \ + -optimized-qmake \ + -iconv \ + -xrender \ + -fontconfig \ + -D ENABLE_VIDEO=0 \ +&& make --jobs $(($NB_CORES*2)) --silent \ +&& make install \ +\ +# Install wkhtmltopdf +&& cd /tmp/wkhtmltopdf \ +&& qmake \ +&& make --jobs $(($NB_CORES*2)) --silent \ +&& make install \ +&& make clean \ +&& make distclean \ +\ +# Uninstall qt +&& cd /tmp/wkhtmltopdf/qt \ +&& make uninstall \ +&& make clean \ +&& make distclean \ +\ +# Clean up when done +&& rm -rf /tmp/* \ +&& apk del .build-deps + +# Image +FROM node:22.13.0-alpine3.21 + +RUN apk add --no-cache \ + libstdc++ \ + libx11 \ + libxrender \ + libxext \ + libssl3 \ + ca-certificates \ + fontconfig \ + freetype \ + ttf-dejavu \ + ttf-droid \ + ttf-freefont \ + ttf-liberation \ +&& apk add --no-cache --virtual .build-deps \ + msttcorefonts-installer \ +\ +# Install microsoft fonts +&& update-ms-fonts \ +&& fc-cache -f \ +\ +# Clean up when done +&& rm -rf /tmp/* \ +&& apk del .build-deps + +COPY --from=builder /bin/wkhtmltopdf /bin/wkhtmltopdf +COPY --from=builder /bin/wkhtmltoimage /bin/wkhtmltoimage +COPY --from=builder /lib/libwkhtmltox* /lib/ + diff --git a/archive/alpine-node-wkhtmltopdf/Dockerfile_22.13.0-0.12.6-small b/archive/alpine-node-wkhtmltopdf/Dockerfile_22.13.0-0.12.6-small new file mode 100644 index 0000000..273cb7b --- /dev/null +++ b/archive/alpine-node-wkhtmltopdf/Dockerfile_22.13.0-0.12.6-small @@ -0,0 +1,208 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +# Image +FROM alpine:3.21 AS builder + +# Environment variables +ENV WKHTMLTOX_VERSION=0.12.6 + +# Copy patches +RUN mkdir -p /tmp/patches +COPY conf/* /tmp/patches/ + +# Alpine 3.11 and higher versions have libstdc++ and g++ v9+ in their repositories which breaks the build +RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.10/main' >> /etc/apk/repositories + +# Install needed packages +RUN apk add --no-cache \ + libstdc++=8.3.0-r0 \ + libx11 \ + libxrender \ + libxext \ + libssl3 \ + ca-certificates \ + fontconfig \ + freetype \ + ttf-dejavu \ + ttf-droid \ + ttf-freefont \ + ttf-liberation \ +&& apk add --no-cache --virtual .build-deps \ + g++=8.3.0-r0 \ + git \ + gtk+2.0 \ + gtk+2.0-dev \ + make \ + mesa-dev \ + msttcorefonts-installer \ + openssl-dev \ + patch \ + fontconfig-dev \ + freetype-dev \ +\ +# Install microsoft fonts +&& update-ms-fonts \ +&& fc-cache -f \ +\ +# Download source files +&& git clone --recursive https://github.com/wkhtmltopdf/wkhtmltopdf.git /tmp/wkhtmltopdf \ +&& cd /tmp/wkhtmltopdf \ +&& git checkout tags/$WKHTMLTOX_VERSION \ +\ +# Apply patches +&& cd /tmp/wkhtmltopdf/qt \ +&& patch -p1 -i /tmp/patches/qt-musl.patch \ +&& patch -p1 -i /tmp/patches/qt-musl-iconv-no-bom.patch \ +&& patch -p1 -i /tmp/patches/qt-recursive-global-mutex.patch \ +&& patch -p1 -i /tmp/patches/qt-gcc6.patch \ +\ +# Modify qmake config +&& sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf \ +&& sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf \ +&& sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf \ +\ +# Prepare optimal build settings +&& NB_CORES=$(grep -c '^processor' /proc/cpuinfo) \ +\ +# Install qt +&& ./configure -confirm-license -opensource \ + -prefix /usr \ + -datadir /usr/share/qt \ + -sysconfdir /etc \ + -plugindir /usr/lib/qt/plugins \ + -importdir /usr/lib/qt/imports \ + -silent \ + -release \ + -static \ + -webkit \ + -script \ + -svg \ + -exceptions \ + -xmlpatterns \ + -openssl-linked \ + -no-fast \ + -no-largefile \ + -no-accessibility \ + -no-stl \ + -no-sql-ibase \ + -no-sql-mysql \ + -no-sql-odbc \ + -no-sql-psql \ + -no-sql-sqlite \ + -no-sql-sqlite2 \ + -no-qt3support \ + -no-opengl \ + -no-openvg \ + -no-system-proxies \ + -no-multimedia \ + -no-audio-backend \ + -no-phonon \ + -no-phonon-backend \ + -no-javascript-jit \ + -no-scripttools \ + -no-declarative \ + -no-declarative-debug \ + -no-mmx \ + -no-3dnow \ + -no-sse \ + -no-sse2 \ + -no-sse3 \ + -no-ssse3 \ + -no-sse4.1 \ + -no-sse4.2 \ + -no-avx \ + -no-neon \ + -no-rpath \ + -no-nis \ + -no-cups \ + -no-pch \ + -no-dbus \ + -no-separate-debug-info \ + -no-gtkstyle \ + -no-nas-sound \ + -no-opengl \ + -no-openvg \ + -no-sm \ + -no-xshape \ + -no-xvideo \ + -no-xsync \ + -no-xinerama \ + -no-xcursor \ + -no-xfixes \ + -no-xrandr \ + -no-mitshm \ + -no-xinput \ + -no-xkb \ + -no-glib \ + -no-icu \ + -nomake demos \ + -nomake docs \ + -nomake examples \ + -nomake tools \ + -nomake tests \ + -nomake translations \ + -graphicssystem raster \ + -qt-zlib \ + -qt-libpng \ + -qt-libmng \ + -qt-libtiff \ + -qt-libjpeg \ + -optimized-qmake \ + -iconv \ + -xrender \ + -fontconfig \ + -D ENABLE_VIDEO=0 \ +&& make --jobs $(($NB_CORES*2)) --silent \ +&& make install \ +\ +# Install wkhtmltopdf +&& cd /tmp/wkhtmltopdf \ +&& qmake \ +&& make --jobs $(($NB_CORES*2)) --silent \ +&& make install \ +&& make clean \ +&& make distclean \ +\ +# Uninstall qt +&& cd /tmp/wkhtmltopdf/qt \ +&& make uninstall \ +&& make clean \ +&& make distclean \ +\ +# Clean up when done +&& rm -rf /tmp/* \ +&& apk del .build-deps + +# Image +FROM node:22.13.0-alpine3.21 + +RUN apk add --no-cache \ + libstdc++ \ + libx11 \ + libxrender \ + libxext \ + libssl3 \ + ca-certificates \ + fontconfig \ + freetype \ + ttf-dejavu \ + ttf-droid \ + ttf-freefont \ + ttf-liberation \ +&& apk add --no-cache --virtual .build-deps \ + msttcorefonts-installer \ +\ +# Install microsoft fonts +&& update-ms-fonts \ +&& fc-cache -f \ +\ +# Clean up when done +&& rm -rf /tmp/* \ +&& apk del .build-deps + +COPY --from=builder /bin/wkhtmltopdf /bin/wkhtmltopdf + diff --git a/archive/alpine-python-wkhtmltopdf/Dockerfile_3.13.1-0.12.6-full b/archive/alpine-python-wkhtmltopdf/Dockerfile_3.13.1-0.12.6-full new file mode 100644 index 0000000..234ebe8 --- /dev/null +++ b/archive/alpine-python-wkhtmltopdf/Dockerfile_3.13.1-0.12.6-full @@ -0,0 +1,210 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +# Image +FROM alpine:3.21 AS builder + +# Environment variables +ENV WKHTMLTOX_VERSION=0.12.6 + +# Copy patches +RUN mkdir -p /tmp/patches +COPY conf/* /tmp/patches/ + +# Alpine 3.11 and higher versions have libstdc++ and g++ v9+ in their repositories which breaks the build +RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.10/main' >> /etc/apk/repositories + +# Install needed packages +RUN apk add --no-cache \ + libstdc++=8.3.0-r0 \ + libx11 \ + libxrender \ + libxext \ + libssl3 \ + ca-certificates \ + fontconfig \ + freetype \ + ttf-dejavu \ + ttf-droid \ + ttf-freefont \ + ttf-liberation \ +&& apk add --no-cache --virtual .build-deps \ + g++=8.3.0-r0 \ + git \ + gtk+2.0 \ + gtk+2.0-dev \ + make \ + mesa-dev \ + msttcorefonts-installer \ + openssl-dev \ + patch \ + fontconfig-dev \ + freetype-dev \ +\ +# Install microsoft fonts +&& update-ms-fonts \ +&& fc-cache -f \ +\ +# Download source files +&& git clone --recursive https://github.com/wkhtmltopdf/wkhtmltopdf.git /tmp/wkhtmltopdf \ +&& cd /tmp/wkhtmltopdf \ +&& git checkout tags/$WKHTMLTOX_VERSION \ +\ +# Apply patches +&& cd /tmp/wkhtmltopdf/qt \ +&& patch -p1 -i /tmp/patches/qt-musl.patch \ +&& patch -p1 -i /tmp/patches/qt-musl-iconv-no-bom.patch \ +&& patch -p1 -i /tmp/patches/qt-recursive-global-mutex.patch \ +&& patch -p1 -i /tmp/patches/qt-gcc6.patch \ +\ +# Modify qmake config +&& sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf \ +&& sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf \ +&& sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf \ +\ +# Prepare optimal build settings +&& NB_CORES=$(grep -c '^processor' /proc/cpuinfo) \ +\ +# Install qt +&& ./configure -confirm-license -opensource \ + -prefix /usr \ + -datadir /usr/share/qt \ + -sysconfdir /etc \ + -plugindir /usr/lib/qt/plugins \ + -importdir /usr/lib/qt/imports \ + -silent \ + -release \ + -static \ + -webkit \ + -script \ + -svg \ + -exceptions \ + -xmlpatterns \ + -openssl-linked \ + -no-fast \ + -no-largefile \ + -no-accessibility \ + -no-stl \ + -no-sql-ibase \ + -no-sql-mysql \ + -no-sql-odbc \ + -no-sql-psql \ + -no-sql-sqlite \ + -no-sql-sqlite2 \ + -no-qt3support \ + -no-opengl \ + -no-openvg \ + -no-system-proxies \ + -no-multimedia \ + -no-audio-backend \ + -no-phonon \ + -no-phonon-backend \ + -no-javascript-jit \ + -no-scripttools \ + -no-declarative \ + -no-declarative-debug \ + -no-mmx \ + -no-3dnow \ + -no-sse \ + -no-sse2 \ + -no-sse3 \ + -no-ssse3 \ + -no-sse4.1 \ + -no-sse4.2 \ + -no-avx \ + -no-neon \ + -no-rpath \ + -no-nis \ + -no-cups \ + -no-pch \ + -no-dbus \ + -no-separate-debug-info \ + -no-gtkstyle \ + -no-nas-sound \ + -no-opengl \ + -no-openvg \ + -no-sm \ + -no-xshape \ + -no-xvideo \ + -no-xsync \ + -no-xinerama \ + -no-xcursor \ + -no-xfixes \ + -no-xrandr \ + -no-mitshm \ + -no-xinput \ + -no-xkb \ + -no-glib \ + -no-icu \ + -nomake demos \ + -nomake docs \ + -nomake examples \ + -nomake tools \ + -nomake tests \ + -nomake translations \ + -graphicssystem raster \ + -qt-zlib \ + -qt-libpng \ + -qt-libmng \ + -qt-libtiff \ + -qt-libjpeg \ + -optimized-qmake \ + -iconv \ + -xrender \ + -fontconfig \ + -D ENABLE_VIDEO=0 \ +&& make --jobs $(($NB_CORES*2)) --silent \ +&& make install \ +\ +# Install wkhtmltopdf +&& cd /tmp/wkhtmltopdf \ +&& qmake \ +&& make --jobs $(($NB_CORES*2)) --silent \ +&& make install \ +&& make clean \ +&& make distclean \ +\ +# Uninstall qt +&& cd /tmp/wkhtmltopdf/qt \ +&& make uninstall \ +&& make clean \ +&& make distclean \ +\ +# Clean up when done +&& rm -rf /tmp/* \ +&& apk del .build-deps + +# Image +FROM python:3.13.1-alpine3.21 + +RUN apk add --no-cache \ + libstdc++ \ + libx11 \ + libxrender \ + libxext \ + libssl3 \ + ca-certificates \ + fontconfig \ + freetype \ + ttf-dejavu \ + ttf-droid \ + ttf-freefont \ + ttf-liberation \ +&& apk add --no-cache --virtual .build-deps \ + msttcorefonts-installer \ +\ +# Install microsoft fonts +&& update-ms-fonts \ +&& fc-cache -f \ +\ +# Clean up when done +&& rm -rf /tmp/* \ +&& apk del .build-deps + +COPY --from=builder /bin/wkhtmltopdf /bin/wkhtmltopdf +COPY --from=builder /bin/wkhtmltoimage /bin/wkhtmltoimage +COPY --from=builder /lib/libwkhtmltox* /lib/ + diff --git a/archive/alpine-python-wkhtmltopdf/Dockerfile_3.13.1-0.12.6-small b/archive/alpine-python-wkhtmltopdf/Dockerfile_3.13.1-0.12.6-small new file mode 100644 index 0000000..b4723d9 --- /dev/null +++ b/archive/alpine-python-wkhtmltopdf/Dockerfile_3.13.1-0.12.6-small @@ -0,0 +1,208 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +# Image +FROM alpine:3.21 AS builder + +# Environment variables +ENV WKHTMLTOX_VERSION=0.12.6 + +# Copy patches +RUN mkdir -p /tmp/patches +COPY conf/* /tmp/patches/ + +# Alpine 3.11 and higher versions have libstdc++ and g++ v9+ in their repositories which breaks the build +RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.10/main' >> /etc/apk/repositories + +# Install needed packages +RUN apk add --no-cache \ + libstdc++=8.3.0-r0 \ + libx11 \ + libxrender \ + libxext \ + libssl3 \ + ca-certificates \ + fontconfig \ + freetype \ + ttf-dejavu \ + ttf-droid \ + ttf-freefont \ + ttf-liberation \ +&& apk add --no-cache --virtual .build-deps \ + g++=8.3.0-r0 \ + git \ + gtk+2.0 \ + gtk+2.0-dev \ + make \ + mesa-dev \ + msttcorefonts-installer \ + openssl-dev \ + patch \ + fontconfig-dev \ + freetype-dev \ +\ +# Install microsoft fonts +&& update-ms-fonts \ +&& fc-cache -f \ +\ +# Download source files +&& git clone --recursive https://github.com/wkhtmltopdf/wkhtmltopdf.git /tmp/wkhtmltopdf \ +&& cd /tmp/wkhtmltopdf \ +&& git checkout tags/$WKHTMLTOX_VERSION \ +\ +# Apply patches +&& cd /tmp/wkhtmltopdf/qt \ +&& patch -p1 -i /tmp/patches/qt-musl.patch \ +&& patch -p1 -i /tmp/patches/qt-musl-iconv-no-bom.patch \ +&& patch -p1 -i /tmp/patches/qt-recursive-global-mutex.patch \ +&& patch -p1 -i /tmp/patches/qt-gcc6.patch \ +\ +# Modify qmake config +&& sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf \ +&& sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf \ +&& sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf \ +\ +# Prepare optimal build settings +&& NB_CORES=$(grep -c '^processor' /proc/cpuinfo) \ +\ +# Install qt +&& ./configure -confirm-license -opensource \ + -prefix /usr \ + -datadir /usr/share/qt \ + -sysconfdir /etc \ + -plugindir /usr/lib/qt/plugins \ + -importdir /usr/lib/qt/imports \ + -silent \ + -release \ + -static \ + -webkit \ + -script \ + -svg \ + -exceptions \ + -xmlpatterns \ + -openssl-linked \ + -no-fast \ + -no-largefile \ + -no-accessibility \ + -no-stl \ + -no-sql-ibase \ + -no-sql-mysql \ + -no-sql-odbc \ + -no-sql-psql \ + -no-sql-sqlite \ + -no-sql-sqlite2 \ + -no-qt3support \ + -no-opengl \ + -no-openvg \ + -no-system-proxies \ + -no-multimedia \ + -no-audio-backend \ + -no-phonon \ + -no-phonon-backend \ + -no-javascript-jit \ + -no-scripttools \ + -no-declarative \ + -no-declarative-debug \ + -no-mmx \ + -no-3dnow \ + -no-sse \ + -no-sse2 \ + -no-sse3 \ + -no-ssse3 \ + -no-sse4.1 \ + -no-sse4.2 \ + -no-avx \ + -no-neon \ + -no-rpath \ + -no-nis \ + -no-cups \ + -no-pch \ + -no-dbus \ + -no-separate-debug-info \ + -no-gtkstyle \ + -no-nas-sound \ + -no-opengl \ + -no-openvg \ + -no-sm \ + -no-xshape \ + -no-xvideo \ + -no-xsync \ + -no-xinerama \ + -no-xcursor \ + -no-xfixes \ + -no-xrandr \ + -no-mitshm \ + -no-xinput \ + -no-xkb \ + -no-glib \ + -no-icu \ + -nomake demos \ + -nomake docs \ + -nomake examples \ + -nomake tools \ + -nomake tests \ + -nomake translations \ + -graphicssystem raster \ + -qt-zlib \ + -qt-libpng \ + -qt-libmng \ + -qt-libtiff \ + -qt-libjpeg \ + -optimized-qmake \ + -iconv \ + -xrender \ + -fontconfig \ + -D ENABLE_VIDEO=0 \ +&& make --jobs $(($NB_CORES*2)) --silent \ +&& make install \ +\ +# Install wkhtmltopdf +&& cd /tmp/wkhtmltopdf \ +&& qmake \ +&& make --jobs $(($NB_CORES*2)) --silent \ +&& make install \ +&& make clean \ +&& make distclean \ +\ +# Uninstall qt +&& cd /tmp/wkhtmltopdf/qt \ +&& make uninstall \ +&& make clean \ +&& make distclean \ +\ +# Clean up when done +&& rm -rf /tmp/* \ +&& apk del .build-deps + +# Image +FROM python:3.13.1-alpine3.21 + +RUN apk add --no-cache \ + libstdc++ \ + libx11 \ + libxrender \ + libxext \ + libssl3 \ + ca-certificates \ + fontconfig \ + freetype \ + ttf-dejavu \ + ttf-droid \ + ttf-freefont \ + ttf-liberation \ +&& apk add --no-cache --virtual .build-deps \ + msttcorefonts-installer \ +\ +# Install microsoft fonts +&& update-ms-fonts \ +&& fc-cache -f \ +\ +# Clean up when done +&& rm -rf /tmp/* \ +&& apk del .build-deps + +COPY --from=builder /bin/wkhtmltopdf /bin/wkhtmltopdf + diff --git a/archive/alpine-wkhtmltopdf/Dockerfile_3.21.2-0.12.6-full b/archive/alpine-wkhtmltopdf/Dockerfile_3.21.2-0.12.6-full new file mode 100644 index 0000000..9566c24 --- /dev/null +++ b/archive/alpine-wkhtmltopdf/Dockerfile_3.21.2-0.12.6-full @@ -0,0 +1,211 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +# Image +FROM alpine:3.21.2 AS builder + +# Environment variables +ENV WKHTMLTOX_VERSION=0.12.6 + +# Copy patches +RUN mkdir -p /tmp/patches +COPY conf/* /tmp/patches/ + +# Alpine 3.11 and higher versions have libstdc++ and g++ v9+ in their repositories which breaks the build +RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.10/main' >> /etc/apk/repositories + +# Install needed packages +RUN apk add --no-cache \ + libstdc++=8.3.0-r0 \ + libx11 \ + libxrender \ + libxext \ + libssl3 \ + ca-certificates \ + fontconfig \ + freetype \ + ttf-dejavu \ + ttf-droid \ + ttf-freefont \ + ttf-liberation \ +&& apk add --no-cache --virtual .build-deps \ + g++=8.3.0-r0 \ + git \ + gtk+2.0 \ + gtk+2.0-dev \ + make \ + mesa-dev \ + msttcorefonts-installer \ + openssl-dev \ + patch \ + fontconfig-dev \ + freetype-dev \ +\ +# Install microsoft fonts +&& update-ms-fonts \ +&& fc-cache -f \ +\ +# Download source files +&& git clone --recursive https://github.com/wkhtmltopdf/wkhtmltopdf.git /tmp/wkhtmltopdf \ +&& cd /tmp/wkhtmltopdf \ +&& git checkout tags/$WKHTMLTOX_VERSION \ +\ +# Apply patches +&& cd /tmp/wkhtmltopdf/qt \ +&& patch -p1 -i /tmp/patches/qt-musl.patch \ +&& patch -p1 -i /tmp/patches/qt-musl-iconv-no-bom.patch \ +&& patch -p1 -i /tmp/patches/qt-recursive-global-mutex.patch \ +&& patch -p1 -i /tmp/patches/qt-gcc6.patch \ +\ +# Modify qmake config +&& sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf \ +&& sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf \ +&& sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf \ +\ +# Prepare optimal build settings +&& NB_CORES=$(grep -c '^processor' /proc/cpuinfo) \ +\ +# Install qt +&& ./configure -confirm-license -opensource \ + -prefix /usr \ + -datadir /usr/share/qt \ + -sysconfdir /etc \ + -plugindir /usr/lib/qt/plugins \ + -importdir /usr/lib/qt/imports \ + -silent \ + -release \ + -static \ + -webkit \ + -script \ + -svg \ + -exceptions \ + -xmlpatterns \ + -openssl-linked \ + -no-fast \ + -no-largefile \ + -no-accessibility \ + -no-stl \ + -no-sql-ibase \ + -no-sql-mysql \ + -no-sql-odbc \ + -no-sql-psql \ + -no-sql-sqlite \ + -no-sql-sqlite2 \ + -no-qt3support \ + -no-opengl \ + -no-openvg \ + -no-system-proxies \ + -no-multimedia \ + -no-audio-backend \ + -no-phonon \ + -no-phonon-backend \ + -no-javascript-jit \ + -no-scripttools \ + -no-declarative \ + -no-declarative-debug \ + -no-mmx \ + -no-3dnow \ + -no-sse \ + -no-sse2 \ + -no-sse3 \ + -no-ssse3 \ + -no-sse4.1 \ + -no-sse4.2 \ + -no-avx \ + -no-neon \ + -no-rpath \ + -no-nis \ + -no-cups \ + -no-pch \ + -no-dbus \ + -no-separate-debug-info \ + -no-gtkstyle \ + -no-nas-sound \ + -no-opengl \ + -no-openvg \ + -no-sm \ + -no-xshape \ + -no-xvideo \ + -no-xsync \ + -no-xinerama \ + -no-xcursor \ + -no-xfixes \ + -no-xrandr \ + -no-mitshm \ + -no-xinput \ + -no-xkb \ + -no-glib \ + -no-icu \ + -nomake demos \ + -nomake docs \ + -nomake examples \ + -nomake tools \ + -nomake tests \ + -nomake translations \ + -graphicssystem raster \ + -qt-zlib \ + -qt-libpng \ + -qt-libmng \ + -qt-libtiff \ + -qt-libjpeg \ + -optimized-qmake \ + -iconv \ + -xrender \ + -fontconfig \ + -D ENABLE_VIDEO=0 \ +&& make --jobs $(($NB_CORES*2)) --silent \ +&& make install \ +\ +# Install wkhtmltopdf +&& cd /tmp/wkhtmltopdf \ +&& qmake \ +&& make --jobs $(($NB_CORES*2)) --silent \ +&& make install \ +&& make clean \ +&& make distclean \ +\ +# Uninstall qt +&& cd /tmp/wkhtmltopdf/qt \ +&& make uninstall \ +&& make clean \ +&& make distclean \ +\ +# Clean up when done +&& rm -rf /tmp/* \ +&& apk del .build-deps + +# Image +FROM alpine:3.21.2 + +RUN apk add --no-cache \ + libstdc++ \ + libx11 \ + libxrender \ + libxext \ + libssl3 \ + ca-certificates \ + fontconfig \ + freetype \ + ttf-dejavu \ + ttf-droid \ + ttf-freefont \ + ttf-liberation \ +&& apk add --no-cache --virtual .build-deps \ + msttcorefonts-installer \ +\ +# Install microsoft fonts +&& update-ms-fonts \ +&& fc-cache -f \ +\ +# Clean up when done +&& rm -rf /tmp/* \ +&& apk del .build-deps + +COPY --from=builder /bin/wkhtmltopdf /bin/wkhtmltopdf +COPY --from=builder /bin/wkhtmltoimage /bin/wkhtmltoimage +COPY --from=builder /lib/libwkhtmltox* /lib/ + +ENTRYPOINT ["wkhtmltopdf"] diff --git a/archive/alpine-wkhtmltopdf/Dockerfile_3.21.2-0.12.6-small b/archive/alpine-wkhtmltopdf/Dockerfile_3.21.2-0.12.6-small new file mode 100644 index 0000000..2b3259b --- /dev/null +++ b/archive/alpine-wkhtmltopdf/Dockerfile_3.21.2-0.12.6-small @@ -0,0 +1,209 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +# Image +FROM alpine:3.21.2 AS builder + +# Environment variables +ENV WKHTMLTOX_VERSION=0.12.6 + +# Copy patches +RUN mkdir -p /tmp/patches +COPY conf/* /tmp/patches/ + +# Alpine 3.11 and higher versions have libstdc++ and g++ v9+ in their repositories which breaks the build +RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.10/main' >> /etc/apk/repositories + +# Install needed packages +RUN apk add --no-cache \ + libstdc++=8.3.0-r0 \ + libx11 \ + libxrender \ + libxext \ + libssl3 \ + ca-certificates \ + fontconfig \ + freetype \ + ttf-dejavu \ + ttf-droid \ + ttf-freefont \ + ttf-liberation \ +&& apk add --no-cache --virtual .build-deps \ + g++=8.3.0-r0 \ + git \ + gtk+2.0 \ + gtk+2.0-dev \ + make \ + mesa-dev \ + msttcorefonts-installer \ + openssl-dev \ + patch \ + fontconfig-dev \ + freetype-dev \ +\ +# Install microsoft fonts +&& update-ms-fonts \ +&& fc-cache -f \ +\ +# Download source files +&& git clone --recursive https://github.com/wkhtmltopdf/wkhtmltopdf.git /tmp/wkhtmltopdf \ +&& cd /tmp/wkhtmltopdf \ +&& git checkout tags/$WKHTMLTOX_VERSION \ +\ +# Apply patches +&& cd /tmp/wkhtmltopdf/qt \ +&& patch -p1 -i /tmp/patches/qt-musl.patch \ +&& patch -p1 -i /tmp/patches/qt-musl-iconv-no-bom.patch \ +&& patch -p1 -i /tmp/patches/qt-recursive-global-mutex.patch \ +&& patch -p1 -i /tmp/patches/qt-gcc6.patch \ +\ +# Modify qmake config +&& sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf \ +&& sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf \ +&& sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf \ +\ +# Prepare optimal build settings +&& NB_CORES=$(grep -c '^processor' /proc/cpuinfo) \ +\ +# Install qt +&& ./configure -confirm-license -opensource \ + -prefix /usr \ + -datadir /usr/share/qt \ + -sysconfdir /etc \ + -plugindir /usr/lib/qt/plugins \ + -importdir /usr/lib/qt/imports \ + -silent \ + -release \ + -static \ + -webkit \ + -script \ + -svg \ + -exceptions \ + -xmlpatterns \ + -openssl-linked \ + -no-fast \ + -no-largefile \ + -no-accessibility \ + -no-stl \ + -no-sql-ibase \ + -no-sql-mysql \ + -no-sql-odbc \ + -no-sql-psql \ + -no-sql-sqlite \ + -no-sql-sqlite2 \ + -no-qt3support \ + -no-opengl \ + -no-openvg \ + -no-system-proxies \ + -no-multimedia \ + -no-audio-backend \ + -no-phonon \ + -no-phonon-backend \ + -no-javascript-jit \ + -no-scripttools \ + -no-declarative \ + -no-declarative-debug \ + -no-mmx \ + -no-3dnow \ + -no-sse \ + -no-sse2 \ + -no-sse3 \ + -no-ssse3 \ + -no-sse4.1 \ + -no-sse4.2 \ + -no-avx \ + -no-neon \ + -no-rpath \ + -no-nis \ + -no-cups \ + -no-pch \ + -no-dbus \ + -no-separate-debug-info \ + -no-gtkstyle \ + -no-nas-sound \ + -no-opengl \ + -no-openvg \ + -no-sm \ + -no-xshape \ + -no-xvideo \ + -no-xsync \ + -no-xinerama \ + -no-xcursor \ + -no-xfixes \ + -no-xrandr \ + -no-mitshm \ + -no-xinput \ + -no-xkb \ + -no-glib \ + -no-icu \ + -nomake demos \ + -nomake docs \ + -nomake examples \ + -nomake tools \ + -nomake tests \ + -nomake translations \ + -graphicssystem raster \ + -qt-zlib \ + -qt-libpng \ + -qt-libmng \ + -qt-libtiff \ + -qt-libjpeg \ + -optimized-qmake \ + -iconv \ + -xrender \ + -fontconfig \ + -D ENABLE_VIDEO=0 \ +&& make --jobs $(($NB_CORES*2)) --silent \ +&& make install \ +\ +# Install wkhtmltopdf +&& cd /tmp/wkhtmltopdf \ +&& qmake \ +&& make --jobs $(($NB_CORES*2)) --silent \ +&& make install \ +&& make clean \ +&& make distclean \ +\ +# Uninstall qt +&& cd /tmp/wkhtmltopdf/qt \ +&& make uninstall \ +&& make clean \ +&& make distclean \ +\ +# Clean up when done +&& rm -rf /tmp/* \ +&& apk del .build-deps + +# Image +FROM alpine:3.21.2 + +RUN apk add --no-cache \ + libstdc++ \ + libx11 \ + libxrender \ + libxext \ + libssl3 \ + ca-certificates \ + fontconfig \ + freetype \ + ttf-dejavu \ + ttf-droid \ + ttf-freefont \ + ttf-liberation \ +&& apk add --no-cache --virtual .build-deps \ + msttcorefonts-installer \ +\ +# Install microsoft fonts +&& update-ms-fonts \ +&& fc-cache -f \ +\ +# Clean up when done +&& rm -rf /tmp/* \ +&& apk del .build-deps + +COPY --from=builder /bin/wkhtmltopdf /bin/wkhtmltopdf + +ENTRYPOINT ["wkhtmltopdf"] diff --git a/update.sh b/update.sh index d6a30ce..ab7aa15 100755 --- a/update.sh +++ b/update.sh @@ -38,9 +38,9 @@ for version in \ # Supported base images for image in \ - alpine:3.20.3 \ - node:22.11.0-alpine3.20 \ - python:3.13.0-alpine3.20 \ + alpine:3.21.2 \ + node:22.13.0-alpine3.21 \ + python:3.13.1-alpine3.21 \ ; do # Parse image string base="${image%%:*}" @@ -97,12 +97,12 @@ for version in \ ;; node*) replaceRules+=" - s/%%BUILDER%%/alpine:3.20/g; + s/%%BUILDER%%/alpine:3.21/g; " ;; python*) replaceRules+=" - s/%%BUILDER%%/alpine:3.20/g; + s/%%BUILDER%%/alpine:3.21/g; " ;; *)