ImageMagick with Docker
Hello. I'm really new with docker. I want to dockerize a python application running with MoviePy which unfortunately uses imageMagick. Blow are the relevant lines of the dockerfile and the error message I get when running the docker image.
dockerfile:
FROM python:3.9
Set the working directory in the container
WORKDIR /usr/src/app
Install ffmpeg
RUN apt-get update
&& apt-get install -y ffmpeg
&& rm -rf /var/lib/apt/lists/*
Install ImageMagick
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libtiff-dev imagemagick
Error:
{
"detail": "MoviePy Error: creation of None failed because of the following error:\n\nconvert: attempt to perform an operation not allowed by the security policy @/tmp/tmp5gdu1dti.txt' @ error/property.c/InterpretImageProperties/3708.\nconvert: no images defined PNG32:/tmp/tmp8cepqh22.png' @ error/convert.c/ConvertImageCommand/3229.\n.\n\n.This error can be due to the fact that ImageMagick is not installed on your computer, or (for Windows users) that you didn't specify the path to the ImageMagick binary in file conf.py, or that the path you specified is incorrect"
}
How do I fix this? I'm at ends. I've tried modifiying the permissions.
Posted Jan 15, 2024, 1:39 PM UTC