Change ImageMagick policy on a Dockerfile

  docker, dockerfile, imagemagick

There seems to have been a change recently on ImageMagick which breaks conversion from pdf to png. My investigation let me to the policy.xml file and this line:

<policy domain="coder" rights="none" pattern="PDF" />

which needs to be changed to this

<policy domain="coder" rights="read|write" pattern="PDF" />

(Note: I didn’t have this problem before).

I am able to change that on my personal machine but now I need to change it on a docker container configured through a Dockerfile. How can I do that?

I have tried something using environment variables without success. You can see my dockerfile here:

Thank you for your help

Source: Dockerfile Questions