I have docker alpine image for my project and I need to install gifsicle
node package, but while installing it I'm getting error
Directory: /var/www/abboom-landing/node_modules/gifsicle
Output:
⚠ Response code 404 (Not Found)
⚠ gifsicle pre-build test failed
ℹ compiling from source
✖ Error: Command failed: /bin/sh -c autoreconf -ivf
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --output=aclocal.m4t
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
I found that I need to add autoconf
and libtool
packages to my Dockerfile, I did it but still have the same error, and I can't find any valuable solution.
Here is my docker file:
FROM php:7.3-fpm-alpine
ENV BUILD_DEPS autoconf file gcc libc-dev make g++ pkgconf re2c git
RUN apk add --update --no-cache --virtual .build-deps $BUILD_DEPS
RUN apk add --no-cache --virtual .php-build-deps \
libsodium \
freetype-dev \
libmcrypt-dev \
postgresql-dev \
libxml2-dev \
libzip-dev \
libcurl \
libpng-dev \
autoconf \
libtool \
nasm \
zlib-dev cyrus-sasl-dev libmemcached-dev
RUN NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1)
## Installable modules
RUN docker-php-ext-install iconv bcmath pdo_mysql opcache pgsql pdo_pgsql soap pcntl exif zip gd calendar dom json
## just good to have installed
RUN apk add --no-cache ca-certificates wget
RUN cd ~ \
&& curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer
## Install dependencies like editor xdebug etc.
RUN apk update && apk add --no-cache vim g++ make zlib-dev \
$BUILD_DEPS \
&& pecl install xdebug && docker-php-ext-enable xdebug \
&& rm -rf /var/cache/apk/*
RUN pecl install mongodb \
&& docker-php-ext-enable mongodb
RUN pecl install redis \
&& docker-php-ext-enable redis
RUN apk --update add openssh-client
RUN apk add --update nodejs yarn
## configure xdebug
RUN printf "xdebug.cli_color=1\nxdebug.remote_connect_back=1\nxdebug.remote_autostart=1\nxdebug.remote_enable=1\nxdebug.ide_key=PHPSTORM" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
ADD php.pool.conf /usr/local/etc
ADD php.ini /usr/local/etc/php/
WORKDIR /var/www/
#EXPOSE 22
CMD ["php-fpm", "--fpm-config", "/usr/local/etc/php-fpm.conf"]
It is missing aclocal
. It is part of automake
tools set.
Adding automake
to dependencies installation should solve this problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With