Mediawiki with Docker Imagemagick

  docker, imagemagick, mediawiki

i want to use Imagemagick that runs inside Docker. I created a convert.sh file that runs my Imagemagick with arguments:

convert.sh :

#!/bin/bash

IMAGE=imagemagick

[email protected]

exec docker run --rm -i --user="$(id -u):$(id -g)" 

-v "$PWD":/workdir 

$IMAGE /bin/bash -c 

"/usr/bin/convert $ARGS"

Command:

./convert.sh --version

Output:

Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org Copyright: © 1999-2017 ImageMagick Studio LLC License: http://www.imagemagick.org/script/license.php Features: Cipher DPC Modules OpenMP Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib

So my imagemagick is accessible.

Inside LocalSetting.php i added:

$wgUseImageMagick = true;

$wgImageMagickConvertCommand = "/path/to/my/convert.sh";

Sadly this isn’t working. I get the error

Error creating the preview image: sh: 1: convert: not found

How can i fix that?

Source: Docker Questions

LEAVE A COMMENT