support 7.1

This commit is contained in:
asonix 2021-06-19 14:09:47 -05:00
parent 530b745181
commit 7f9ac00d4b
3 changed files with 24 additions and 2 deletions

View file

@ -24,7 +24,7 @@ use std::path::{Path, PathBuf};
use std::process::Command;
const MIN_VERSION: &'static str = "7.0";
const MAX_VERSION: &'static str = "7.1";
const MAX_VERSION: &'static str = "7.2";
static HEADER: &'static str = r#"#define MAGICKCORE_QUANTUM_DEPTH 16
#include <MagickWand/MagickWand.h>

View file

@ -4,7 +4,7 @@ RUN apt-get update \
&& apt-get -y install curl build-essential clang pkg-config libjpeg-turbo-progs libpng-dev \
&& rm -rfv /var/lib/apt/lists/*
ENV MAGICK_VERSION 7.0
ENV MAGICK_VERSION 7.1
RUN curl https://download.imagemagick.org/ImageMagick/download/ImageMagick.tar.gz | tar xz \
&& cd ImageMagick-${MAGICK_VERSION}* \
@ -16,6 +16,8 @@ RUN curl https://download.imagemagick.org/ImageMagick/download/ImageMagick.tar.g
RUN adduser --disabled-password --gecos '' magick-rust
ADD policy.xml /usr/local/lib/ImageMagick-7.0.11/config-Q16HDRI/policy.xml
USER magick-rust
ENV USER=magick-rust LD_LIBRARY_PATH=/usr/local/lib

20
docker/policy.xml Normal file
View file

@ -0,0 +1,20 @@
<policymap>
<policy domain="resource" name="memory" value="256MiB" />
<policy domain="resource" name="list-length" value="32" />
<policy domain="resource" name="width" value="10KP" />
<policy domain="resource" name="height" value="10KP" />
<policy domain="resource" name="map" value="512MiB" />
<policy domain="resource" name="area" value="16KP" />
<policy domain="resource" name="disk" value="1GiB" />
<policy domain="resource" name="file" value="768" />
<policy domain="resource" name="thread" value="2" />
<policy domain="coder" rights="none" pattern="*" />
<policy domain="coder" rights="read | write" pattern="{GIF,JPEG,PNG,WEBP}" />
<policy domain="filter" rights="none" pattern="*" />
<policy domain="path" rights="none" pattern="@*" />
<policy domain="delegate" rights="none" pattern="*" />
<policy domain="module" rights="none" pattern="*" />
<policy domain="module" rights="read | write" pattern="{GIF,JPEG,PNG,WEBP}" />
<!-- indirect reads not permitted -->
<policy domain="system" name="precision" value="6" />
</policymap>