I added the line in /Dockerfile.yml :
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install gd pdo pdo_mysql zip gmp bcmath pcntl ldap sysvmsg exif \
&& a2enmod rewrite
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
RUN echo "extension=imagick.so" >> "$PHP_INI_DIR/php.ini" \
ADD https://raw.githubusercontent.com/mlocati/docker-php-extension-installer/master/install-php-extensions /usr/local/bin/
RUN chmod uga+x /usr/local/bin/install-php-extensions && sync && \
install-php-extensions imagick
COPY virtualhost.conf /etc/apache2/sites-enabled/000-default.conf
and still got error :
Build process completed successfully
Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20180731/imagick.so'
Installing '/usr/local/include/php/ext/imagick/php_imagick_shared.h'
install ok: channel://pecl.php.net/imagick-3.4.4
configuration option "php_ini" is not set to php.ini location
You should add "extension=imagick.so" to php.ini
/bin/sh: 1: imagick: not found
ERROR: Service 'web' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y python libfreetype6-dev libwebp-dev libjpeg62-turbo-dev libpng-dev lib
zip-dev nano mc git-core
Also I have virtualhost.conf included, with content :
<VirtualHost *:80>
DocumentRoot /var/www/vanilla_crm_docker_root/public
<Directory /var/www/vanilla_crm_docker_root/public>
Order allow,deny
Allow from all
Options -MultiViews
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ / [L,R=301]
php_value memory_limit 2048M
php_value file_uploads On
php_value upload_max_filesize 200M
php_value post_max_size 200M
php_value max_execution_time 1000
php_value short_open_tag On
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
</VirtualHost>
- can it be that this file overwrites “extension=imagick.so” option we prepare in our command?
- Can I add extension=imagick.so option in this file ?