collection.dockerfile/alpine/fpmredis/Dockerfile

11 lines
1.0 KiB
Docker

FROM alpine:latest
ENV container docker
RUN apk update; apk upgrade; apk add php82-gd php82-session php82-json php82-fpm php82-mysqlnd php82-mysqli php82-mbstring php82-xml php82-redis php82-curl php82-gmp bash php82-pdo_mysql php82-zip php82-dom php82-xmlwriter php82-xmlreader php82-ctype php82-simplexml php82-intl php82-iconv redis supervisor php82-opcache php82-posix php82-fileinfo php82-pecl-imagick php82-bcmath php82-pcntl php82-cli php82-sysvsem php82-exif php82-sodium php82-bz2
COPY supervisord.conf /etc/supervisord.conf
COPY fpm-www.conf /etc/php82/php-fpm.d/www.conf
COPY nc-upgrade.sh /var/www/nc-upgrade.sh
RUN sed -i -e 's/^disable_functions.*/disable_functions=exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,eval,base64_decode/g' -e 's/^expose_php.*/expose_php=off/g' -e 's/^memory_limit.*/memory_limit=512M/g' -e 's/^session.save_handler.*/session.save_handler=redis/g' /etc/php82/php.ini
RUN echo 'session.save_path = "tcp://192.168.86.212:6379"' >> /etc/php82/php.ini
EXPOSE 9000
CMD ["/usr/bin/supervisord", "-n"]