Install driver Mongo in apache+php container

Asked

Viewed 57 times

0

I rode a container in accordance with the yml down below:

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

But the image used does not contain the driver in mongodb.

  • How do I install the driver on container already assembled ?
  • For yml with?
  • As access to install manually?
  • 1

    Take a look therein, I think that’s your case.

  • 1

    @Tuxpilgrim as always accurate brother. Thanks !

  • Add your solution as an answer later, it’s a very interesting case ;)

  • 1

    I’m installing and testing. Once I’ve checked everything and I can make it work on the answer. It’s really cool that

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.