After running
- docker-compose down
- docker-compose up -d --build --force-recreate
I had the following error:
NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php7/modules/pdo_sqlite.so' - Error relocating /usr/lib/php7/modules/pdo_sqlite.so: zend_empty_string: symbol not found in Unknown on line 0
With this, TNTSearch stopped working at once.
Weuseambientum.Isitpossibletochangephp.ini?I'mhavingalotofdifficulties.
MyDockerFileisinthe./docker/php7.0-nginx/Dockerfilefolderandlookslikethis:
# Ambientum
#
# Repository: PHP
# Image: PHP-FPM + Nginx
# Version: 7.1.x
# Strategy: PHP From PHP-Alpine Repository (CODECASTS) + Official Nginx
# Base distro: Alpine 3.5
#
# Inspired by official PHP images.
#
FROM ambientum/php:7.1
# Repository/Image Maintainer
MAINTAINER Diego Hernandes <[email protected]>
# Reset user to root to allow software install
USER root
# Copy nginx and entry script
COPY nginx.conf /etc/nginx/nginx.conf
COPY start.sh /home/ambientum/start.sh
# Install nginx from dotdeb (already enabled on base image)
RUN echo "--> Alpine linux repositories" && \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.6/main" >> /etc/apk/repositories && \
echo "http://dl-2.alpinelinux.org/alpine/v3.6/main" >> /etc/apk/repositories && \
echo "http://dl-3.alpinelinux.org/alpine/v3.6/main" >> /etc/apk/repositories && \
echo "http://dl-4.alpinelinux.org/alpine/v3.6/main" >> /etc/apk/repositories && \
echo "http://dl-5.alpinelinux.org/alpine/v3.6/main" >> /etc/apk/repositories && \
echo "http://dl-2.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
echo "http://dl-3.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
echo "http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
echo "http://dl-5.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
echo "--> Installing Nginx" && \
apk add --update --update-cache --allow-untrusted nginx \
php7-dom \
php7-sqlite3 \
php7-pdo_sqlite \
pngquant \
gifsicle \
perl \
jpegoptim && \
echo "--> Fixing permissions" && \
mkdir /var/run/nginx && \
chown -R ambientum:ambientum /var/run/nginx && \
chown -R ambientum:ambientum /var/log/nginx && \
chown -R ambientum:ambientum /var/lib/nginx && \
chmod +x /home/ambientum/start.sh && \
chown -R ambientum:ambientum /home/ambientum && \
mkdir /var/tmp/nginx/client_body && \
chown -R ambientum:ambientum /var/tmp/nginx
# rm -rf /tmp/* /var/tmp/* /usr/share/doc/*
# Define the running user
USER ambientum
# Application directory
WORKDIR "/var/www/app"
# Expose webserver port
EXPOSE 8080
# Starts a single shell script that puts php-fpm as a daemon and nginx on foreground
CMD ["/home/ambientum/start.sh"]