Skip to content

Instantly share code, notes, and snippets.

@rheinardkorf
Created June 8, 2018 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rheinardkorf/7f612c152d3c59fa7d31124cbb35970b to your computer and use it in GitHub Desktop.
Save rheinardkorf/7f612c152d3c59fa7d31124cbb35970b to your computer and use it in GitHub Desktop.
Add MongoDB PHP driver (with SSL) to Docker image
# Get and make mongodb PHP driver
RUN yes | apt-get install libssl-dev \
&& git clone https://github.com/mongodb/mongo-php-driver.git --recursive \
&& cd mongo-php-driver \
&& phpize \
&& ./configure --with-mongodb-ssl=openssl \
&& make all \
&& make install \
&& echo "extension=mongodb.so" > /opt/php${SHORT_VERSION}/lib/conf.d/ext-mongodb.ini \
&& cd .. \
&& rm -rf mongo-php-driver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment