Skip to content

Instantly share code, notes, and snippets.

@bfcoder
Created March 3, 2023 18:12
Show Gist options
  • Save bfcoder/3fbd5c38e296d1ce259a86770a04f973 to your computer and use it in GitHub Desktop.
Save bfcoder/3fbd5c38e296d1ce259a86770a04f973 to your computer and use it in GitHub Desktop.
Docker build imagemagick in ubuntu 22.04 with heic support
FROM public.ecr.aws/docker/library/ubuntu:22.04
RUN sed -i "s|^# deb-src http:\/\/archive.ubuntu.com\/ubuntu\/ jammy universe|deb-src http://archive.ubuntu.com/ubuntu\/ jammy universe|g" /etc/apt/sources.list
RUN sed -i "s|# deb-src http:\/\/archive.ubuntu.com\/ubuntu\/ jammy-updates universe|deb-src http://archive.ubuntu.com/ubuntu\/ jammy-updates universe|g" /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y \
build-essential \
wget \
git \
autoconf libtool libde265-dev libheif-dev
RUN apt-get build-dep -y imagemagick \
&& apt-get build-dep -y libmagickcore-dev
RUN cd /usr/src \
&& wget -c https://download.imagemagick.org/archive/releases/ImageMagick-7.1.0-62.tar.gz -O - | tar -xz \
&& cd ImageMagick-7.1.0-62 \
&& ./configure --with-heic=yes \
&& make \
&& make install \
&& ldconfig /usr/local/lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment