2

I have the following in a Dockerfile for a container running PHP5.x:

RUN apt-get install -y php5-imagick libmagickwand-dev libmagickcore-dev
RUN pecl install imagick
RUN echo "extension=`php -i | grep ^extension_dir | cut -f 3 -d ' '`/imagick.so" >> /usr/local/etc/php/conf.d/xdebug.ini

The build process for the container does not provide any complaint. When I view phpinfo() output after running the container, there is no mention of imagick.

Is there an obvious step I am missing?

Why is this failing silently?

(This is in the context of a swarm that includes an upstream container running nginx.)

1 Answers1

0

The answer to this lay in the way my swarm was set up.

My docker-compose.yml file had been telling the swarm to use my local Dockerfile for the container that allowed local cli access, but it was running the php service through a different container. Adding a "build" property (including "context" and "dockerfile" child properties) that pointed the relevant container at that local Dockerfile fixed the problem.