collection.dockerfile/alpine/fpmredis/Dockerfile

10 lines
973 B
Docker
Raw Normal View History

2022-05-24 23:36:14 +08:00
FROM alpine:3.16
2022-01-17 15:56:05 +08:00
ENV container docker
2022-05-24 23:36:14 +08:00
RUN apk update; apk upgrade; apk add php81-gd php81-session php81-json php81-fpm php81-mysqlnd php81-mysqli php81-mbstring php81-xml php81-redis php81-curl php81-gmp bash php81-pdo_mysql php81-zip php81-dom php81-xmlwriter php81-xmlreader php81-ctype php81-simplexml php81-intl php81-iconv redis supervisor php81-opcache php81-posix php81-fileinfo php81-pecl-imagick php81-bcmath php81-pcntl php81-cli
2022-01-17 15:56:05 +08:00
COPY supervisord.conf /etc/supervisord.conf
2022-05-24 23:36:14 +08:00
COPY fpm-www.conf /etc/php81/php-fpm.d/www.conf
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/php81/php.ini
RUN echo 'session.save_path = "tcp://192.168.86.212:6379"' >> /etc/php81/php.ini
2022-01-17 15:56:05 +08:00
EXPOSE 9000
CMD ["/usr/bin/supervisord", "-n"]