Skip to content

Commit

Permalink
IM 7.1.1-21, added debian bookworm image
Browse files Browse the repository at this point in the history
  • Loading branch information
dooman87 committed Oct 23, 2023
1 parent 8ca0d24 commit 7fed907
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 2 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,64 @@ jobs:
tags: dpokidov/imagemagick:${{ github.event.release.tag_name }},dpokidov/imagemagick:${{ github.event.release.tag_name }}-bullseye,dpokidov/imagemagick:latest-bullseye,dpokidov/imagemagick:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
build-debian-bookworm:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Docker
uses: ./.github/actions/setup-docker
with:
docker-user: ${{ secrets.DOCKERHUB_USERNAME }}
docker-password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Debian Bookworm Image
id: docker_build_bookworm
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.bookworm
push: false
load: true
tags: im-bookworm
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Testing Debian Bookworm Image
run: |
docker run --rm im-bookworm -list configure
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 500 /imgs/test.jpg /imgs/test-resize.jpg
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 500 /imgs/test.jpg webp:/imgs/test-jpg.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 500 /imgs/test.jpg avif:/imgs/test-jpg.avif
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 100 /imgs/test.png /imgs/test-resize.png
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 100 /imgs/test.png webp:/imgs/test-png.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 100 /imgs/test.png avif:/imgs/test-png.avif
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 100 /imgs/test.png jxl:/imgs/test-png.jxl
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm /imgs/test.pdf /imgs/test-pdf.png
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm /imgs/jpg-with-metadata.jpg /imgs/jpg-with-metadata.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -coalesce /imgs/test.gif /imgs/test-gif.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 200 /imgs/test.tiff /imgs/test-resize.tiff
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 200 /imgs/test.tiff webp:/imgs/test-tiff.webp
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 200 /imgs/test.tiff avif:/imgs/test-tiff.avif
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm -resize 200 /imgs/test.tiff jxl:/imgs/test-tiff.jxl
docker run --rm -v $(pwd)/test-images:/imgs im-bookworm /imgs/test.jpg -antialias -font DejaVu-Sans -pointsize 20 -gravity Southeast -annotate +15+15 'TEST' /imgs/test-text.jpg
docker run --rm im-bookworm -list configure | grep DELEGATES | grep "fontconfig freetype heic jbig jng jpeg jxl lcms lzma png ps tiff webp x xml zlib"
- name: Upload Test Results
uses: actions/upload-artifact@v3
with:
name: bookworm-tests
path: test-images
- name: Push Debian Bookworm image
id: docker_push_bookworm
if: ${{ github.event_name == 'release' }}
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.bookworm
push: true
load: false
platforms: linux/amd64,linux/arm64
tags: dpokidov/imagemagick:${{ github.event.release.tag_name }}-bookworm,dpokidov/imagemagick:latest-bookworm
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
build-ubuntu:
runs-on: ubuntu-20.04
steps:
Expand Down
71 changes: 71 additions & 0 deletions Dockerfile.bookworm
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
FROM debian:bookworm-slim

ENV DEBIAN_FRONTEND=noninteractive

ARG IM_VERSION=7.1.1-21
ARG LIB_HEIF_VERSION=1.17.1
ARG LIB_AOM_VERSION=3.7.0
ARG LIB_WEBP_VERSION=1.3.2
ARG LIBJXL_VERSION=0.8.2

RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get install -y --no-install-recommends git make pkg-config autoconf curl cmake clang libomp-dev ca-certificates automake \
# libaom
yasm \
# libheif
libde265-0 libde265-dev libjpeg62-turbo libjpeg62-turbo-dev x265 libx265-dev libtool \
# libwebp
libsdl1.2-dev libgif-dev \
# libjxl
libbrotli-dev \
# IM
libpng16-16 libpng-dev libjpeg62-turbo libjpeg62-turbo-dev libgomp1 ghostscript libxml2-dev libxml2-utils libtiff-dev libfontconfig1-dev libfreetype6-dev fonts-dejavu liblcms2-2 liblcms2-dev libtcmalloc-minimal4 \
# Install manually to prevent deleting with -dev packages
libxext6 libbrotli1 && \
export CC=clang CXX=clang++ && \
# Building libjxl
git clone -b v${LIBJXL_VERSION} https://github.com/libjxl/libjxl.git --depth 1 --recursive --shallow-submodules && \
cd libjxl && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF .. && \
cmake --build . -- -j$(nproc) && \
cmake --install . && \
cd ../../ && \
rm -rf libjxl && \
ldconfig /usr/local/lib && \
# Building libwebp
git clone -b v${LIB_WEBP_VERSION} --depth 1 https://chromium.googlesource.com/webm/libwebp && \
cd libwebp && \
mkdir build && cd build && cmake ../ && make && make install && \
make && make install && \
ldconfig /usr/local/lib && \
cd ../../ && rm -rf libwebp && \
# Building libaom
git clone -b v${LIB_AOM_VERSION} --depth 1 https://aomedia.googlesource.com/aom && \
mkdir build_aom && \
cd build_aom && \
cmake ../aom/ -DENABLE_TESTS=0 -DBUILD_SHARED_LIBS=1 && make && make install && \
ldconfig /usr/local/lib && \
cd .. && \
rm -rf aom && \
rm -rf build_aom && \
# Building libheif
curl -L https://github.com/strukturag/libheif/releases/download/v${LIB_HEIF_VERSION}/libheif-${LIB_HEIF_VERSION}.tar.gz -o libheif.tar.gz && \
tar -xzvf libheif.tar.gz && cd libheif-${LIB_HEIF_VERSION}/ && mkdir build && cd build && cmake --preset=release .. && make && make install && cd ../../ \
ldconfig /usr/local/lib && \
rm -rf libheif-${LIB_HEIF_VERSION} && rm libheif.tar.gz && \
# Building ImageMagick
git clone -b ${IM_VERSION} --depth 1 https://github.com/ImageMagick/ImageMagick.git && \
cd ImageMagick && \
./configure --without-magick-plus-plus --disable-docs --disable-static --with-tiff --with-jxl --with-tcmalloc && \
make && make install && \
ldconfig /usr/local/lib && \
apt-get remove --autoremove --purge -y make cmake clang clang-14 curl yasm git autoconf automake pkg-config libpng-dev libjpeg62-turbo-dev libde265-dev libx265-dev libxml2-dev libtiff-dev libfontconfig1-dev libfreetype6-dev liblcms2-dev libsdl1.2-dev libgif-dev libbrotli-dev && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /ImageMagick

WORKDIR /imgs

ENTRYPOINT ["convert"]
2 changes: 1 addition & 1 deletion Dockerfile.bullseye
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM debian:bullseye-slim

ENV DEBIAN_FRONTEND=noninteractive

ARG IM_VERSION=7.1.1-20
ARG IM_VERSION=7.1.1-21
ARG LIB_HEIF_VERSION=1.17.1
ARG LIB_AOM_VERSION=3.7.0
ARG LIB_WEBP_VERSION=1.3.2
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:focal

ENV DEBIAN_FRONTEND=noninteractive

ARG IM_VERSION=7.1.1-20
ARG IM_VERSION=7.1.1-21
ARG LIB_HEIF_VERSION=1.17.1
ARG LIB_AOM_VERSION=3.7.0
ARG LIB_WEBP_VERSION=1.3.2
Expand Down

0 comments on commit 7fed907

Please sign in to comment.