Install mongo driver in container apache + php

0

I've set container according to yml below:

web:
 container_name: "apache"
 image: tutum/apache-php
 ports:
 - "80:80"
 volumes:
 - /home/administrador/public_html:/var/www/html
 restart: always

However, the image used does not contain the driver in mongodb .

  • How do I install the driver on container already mounted?
  • Why% with% with you?
  • How to install manually?
asked by anonymous 01.09.2018 / 21:14

1 answer

1

I was able to install using the following commands:

   apt-get update
   apt-get install openssl libssl-dev libcurl4-openssl-dev
   pecl install mongo
   echo "extension=mongo.so" > /usr/local/etc/php/conf.d/mongo.ini

To enter the container and install I used the following command:

docker exec -it [nome_do_container] bash
    
27.09.2018 / 21:46