Public Repository

Last pushed: 7 months ago
Short Description
Php with Wordpress
Full Description

Dockerfile

FROM ubuntu
USER root
ENV TERM xterm
RUN apt-get update;apt-get -y install php-pear php-fpm php7.0-mysql php-xml php-gd php-zip php-sqlite3 php-pgsql php-curl php-intl php-memcache php-mbstring php-mcrypt


RUN usermod -s /bin/bash www-data

#php config
RUN mkdir -p /var/lib/php/sesion
RUN sed -i 's/9000/9001/' /etc/php/7.0/fpm/pool.d/www.conf
RUN sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10G/' /etc/php/7.0/fpm/php.ini
RUN sed -i 's/post_max_size = 8M/post_max_size = 5G/' /etc/php/7.0/fpm/php.ini
RUN sed -i 's/;session.save_path/session.save_path/' /etc/php/7.0/fpm/php.ini
RUN sed -i 's/;default_charset/default_charset/' /etc/php/7.0/fpm/php.ini
RUN sed -i 's/;listen.allowed_clients/listen.allowed_clients/' /etc/php/7.0/fpm/pool.d/www.conf
RUN sed -i 's/;listen.mode/listen.mode/' /etc/php/7.0/fpm/pool.d/www.conf
RUN sed -i 's/listen /;listen /' /etc/php/7.0/fpm/pool.d/www.conf
RUN sed -i '/;listen = /a listen = 0.0.0.0:9001' /etc/php/7.0/fpm/pool.d/www.conf
RUN sed -i 's/listen.allowed_clients = 127.0.0.1/;listen.allowed_clients = 127.0.0.1/' /etc/php/7.0/fpm/pool.d/www.conf
RUN mkdir -p /run/php
RUN mkdir -p /var/www/html

#Add Wordpress
ADD wordpress.tar /var/www/html/
RUN chown -R www-data:www-data /var/www/html

#Startup Script
ADD start.sh /
RUN chmod +x /start.sh

EXPOSE 9001
CMD bash /start.sh

Startup file

#!/bin/bash
php-fpm7.0 -R -c /etc/php/7.0/fpm/pool.d/www.conf -F&
chmod -R 777 /tmp
sleep infinity
Docker Pull Command
Owner
rusher81572

Comments (0)