title: MySQLi not found in docker php container
body: <p>Error:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught Error: Class 'mysqli' not found in /var/www/html/index.php:16 Stack trace: #0 {main} thrown in /var/www/html/index.php on line 16</p>
  </blockquote>
  
  <p>I made the index.php file and PDO mysql connection example code. Everything working as expected, except MySQLi connection. I added docker-php-ext-install run command to docker file but that did not help.</p>
  
  <p>Here is my PHP docker file:</p>
  
  <pre><code>FROM php:7.0-fpm
  RUN docker-php-ext-install pdo pdo_mysql mysqli
  RUN docker-php-ext-enable mysqli 
  </code></pre>
  
  <p>My docker-compose.yml file:</p>
  
  <pre><code>nginx:  
   build: ./nginx/
   container_name: nginx-container
   ports:
    - 8080:80
   links:
    - php
   volumes_from:
    - app-data
  
  php:  
   build: ./php/
   container_name: php-container
   expose:
    - 9000
   links:
    - mysql
   volumes_from:
    - app-data
  
  app-data:  
   #image: php:7.0-fpm
   build: ./php/
   container_name: app-data-container
   volumes:
    - ./www/html/:/var/www/html/
    - ./nginx/nginx:/etc/nginx/conf.d
   command: “true”
  
  mysql:  
   #image: mysql:5.7
   build: ./mysql/
   container_name: mysql-container
   expose:
    - 3306
   ports:
    - 3306:3306
   volumes_from:
    - mysql-data
   environment:
    MYSQL_ROOT_PASSWORD: secret
    MYSQL_DATABASE: zavrel_db
    MYSQL_USER: user
    MYSQL_PASSWORD: password
  
  mysql-data:  
   image: mysql:latest
   container_name: mysql-data-container
   volumes:
    - /var/lib/mysql
   command: "true"
  
  phpmyadmin:  
   image: phpmyadmin/phpmyadmin
   container_name: phpmyadmin-container
   ports:
    - 8888:80
   links:
    - mysql
   environment:
    PMA_HOST: mysql
  </code></pre>
  
  <p>Thank you.</p>