Dockerfile build error due to missing Mongodb unzip command

  docker, docker-build, docker-image, dockerfile

So, I am locally building a Dockerfile in my machine. But I am getting the error as ERROR: unable to unpack /tmp/pear/download/mongodb-1.7.4.tgz.
But I am not able to understand that this build failure is due to some command missing in Dockerfile which will unpack the Mongodb or due to the warnings I am getting.
Below I am attaching the error.

    Build process completed successfully
Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20170718/mcrypt.so'
install ok: channel://pecl.php.net/mcrypt-1.0.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=mcrypt.so" to php.ini
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading mongodb-1.7.4.tgz ...
Starting to download mongodb-1.7.4.tgz (1,223,416 bytes)
................................................................................................done: 475,136 bytes
ERROR: unable to unpack /tmp/pear/download/mongodb-1.7.4.tgz``

This is the dockerfile

#curl iconv session
#docker-php-ext-install pdo_mysql pdo_sqlite mysqli mcrypt gd exif intl xsl json soap dom zip opcache && 
docker-php-ext-install gd iconv pdo_mysql mbstring bcmath pcntl mysqli exif xsl json soap dom zip opcache && 
pecl install mcrypt-1.0.1 && 
pecl install mongodb-1.7.4 && 
pecl install redis-4.1.1 && 
pecl install imagick-beta && 
pecl install rdkafka-3.1.0 && 
docker-php-ext-enable mcrypt && 
docker-php-ext-enable mongodb &&  --here
docker-php-ext-enable redis && 
docker-php-ext-enable imagick && 
docker-php-ext-enable rdkafka && 
docker-php-source delete && 
mkdir -p /etc/nginx && 
mkdir -p /var/www/app && 
mkdir -p /run/nginx && 
mkdir -p /var/log/supervisor && 
EXPECTED_COMPOSER_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig) && 
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && 
php -r "if (hash_file('SHA384', 'composer-setup.php') === '${EXPECTED_COMPOSER_SIGNATURE}') { echo 'Composer.phar Installer verified'; } else { echo 'Composer.phar Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && 
php composer-setup.php --install-dir=/usr/bin --filename=composer && 
php -r "unlink('composer-setup.php');"  && 
apk del gcc musl-dev linux-headers libffi-dev augeas-dev make autoconf && 
# apk del *-dev && `

Source: Docker Questions

LEAVE A COMMENT