title: Can't install PHP extensions in Docker
body: <p>I'm trying to install PHP from Dockerfile on Raspberry Pi 4. I've got a simple code in my Dockerfile:</p>
  <pre><code>FROM php:7.4-apache
  LABEL maintainer=&quot;dev@chialab.io&quot;
  
  # Download script to install PHP extensions and dependencies
  ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
  
  RUN chmod uga+x /usr/local/bin/install-php-extensions &amp;&amp; sync
  
  RUN DEBIAN_FRONTEND=noninteractive apt-get update
  RUN DEBIAN_FRONTEND=noninteractive apt-get install -qq -y curl
  
  #RUN install-php-extensions mysqli pdo_mysql zip
  
  RUN docker-php-ext-install pdo_mysql
  RUN docker-php-ext-install mysqli
  RUN docker-php-ext-install zip
  RUN a2enmod rewrite
  </code></pre>
  <p>Everything goes well until the <em>'docker-php-ext-install'</em> part. Then the execution in the console stops, the last info is this:</p>
  <pre><code>Step 6/9 : RUN docker-php-ext-install pdo_mysql
   ---&gt; Running in 72e3ce3bad85
  </code></pre>
  <p>I also tried the <em>'install-php-extensions'</em> command in the Dockerfile instead, but with the same result.</p>
  <p><strong>Another solution</strong> I tried is to just run the following command in the console:</p>
  <pre><code>docker run --restart always -p 80:80 --name php -v &quot;$PWD&quot;:/var/www -d php:7.4-apache
  </code></pre>
  <p>and install PHP extensions from inside of the container:</p>
  <pre><code>docker exec -it php /bin/bash
  docker-php-ext-install mysqli
  </code></pre>
  <p>But I'm getting the same issue: it just stops. By the way it seems strange to me that when I install the PHP with <em>'docker run'</em> then dozens of PHP extensions install but not mysqli, pdo_mysql or zip (I need these three).</p>
  <p>In both cases I left it for over an hour but nothing moves, it just stops and nothing happens.</p>
  <p>I tried to restart the docker daemon, clear cache, but nothing helps.</p>