-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.php7
29 lines (21 loc) · 1.03 KB
/
Dockerfile.php7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM houseofagile/docker-nginx-php-fpm:php7.2
MAINTAINER Meillaud Jean-Christophe (jc@houseofagile.com)
RUN apt-get install -y pwgen \
mysql-client \
composer && \
composer global require wp-cli/wp-cli && \
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc
# get a default nginx file
COPY config/nginx/restrictions.conf /etc/nginx/
COPY config/nginx/default-wordpress-nginx.conf /root/
RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my.cnf && \
rm /etc/nginx/sites-enabled/default && \
sed -i -e "s/^upload_max_filesize\s*=\s*2M/upload_max_filesize = 20M/" /etc/php/7.2/fpm/php.ini && \
sed -i -e "s/^post_max_size\s*=\s*8M/post_max_size = 20M/" /etc/php/7.2/fpm/php.ini && \
sed -i 's#%%php_fpm_sock_file%%#/run/php/php7.2-fpm.sock#g' /root/default-wordpress-nginx.conf
ADD init_wordpress.sh /etc/my_init.d/init_wordpress.sh
ADD utils_wordpress.sh /root/utils_wordpress.sh
ADD ./config/projects /root/projects
ADD ./config/ssh-keys /root/ssh-keys
EXPOSE 80
CMD ["/sbin/my_init"]