These extensions are pre-installed and enabled on Google App Engine php container:
- APCu
- Bzip2
- cURL
- FPM
- GMP
- mbstring
- mcrypt
- libsodium
- Memcached
- MySQL(PDO) (uses mysqlnd)
- MySQLi (uses mysqlnd)
- OPcache
- OpenSSL
- pcntl
- PostgreSQL
- PostgreSQL (PDO)
- Readline
- recode
- sem
- Sockets
- Zip
- Zlib
They are compiled with php and enabled by default (as you can see here https://github.com/GoogleCloudPlatform/php-docker/blob/master/package-builder/debian/rules.in)
How can I disable some of then? MySQL for example, as I'm using postgres.
Here is my Dockerfile until the moment:
FROM gcr.io/google-appengine/php72:latest
ARG ENABLE_XDEBUG
ARG COMPOSER_FLAGS='--no-scripts --no-dev --prefer-dist'
ENV COMPOSER_FLAGS=${COMPOSER_FLAGS}
RUN apt-get update -y
RUN apt-get install unzip -y
RUN apt-get install autoconf -y
RUN apt-get install build-essential -y
# php-decimal
RUN apt-get install libmpdec-dev -y
RUN pecl install decimal
# Swoole
RUN pecl install swoole-4.2.13
COPY . $APP_DIR
RUN chown -R www-data.www-data $APP_DIR
RUN /bin/bash /build-scripts/move-config-files.sh
RUN /build-scripts/composer.sh;
ENTRYPOINT ["/build-scripts/entrypoint.sh"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
# Option to install xdebug
RUN echo "Will enable XDEBUG: $ENABLE_XDEBUG"
RUN if [ "$ENABLE_XDEBUG" = "true" ]; then pecl install xdebug; fi
RUN if [ "$ENABLE_XDEBUG" = "true" ]; then echo "zend_extension=/opt/php72/lib/x86_64-linux-gnu/extensions/no-debug-non-zts-20170718/xdebug.so" >> /opt/php72/lib/php.ini; fi
EXPOSE 8080