Commit 3033041f authored by Fabio Montefuscolo's avatar Fabio Montefuscolo

Update Dockerfile

parent 78f9820d
FROM hacklab/php:7-apache
MAINTAINER Hacklab <contato@hacklab.com.br>
COPY root/ /
RUN a2enmod headers \
&& docker-php-ext-install pdo_mysql sockets \
&& printf "yes" | pecl install memcached \
&& printf "no\n" | pecl install redis \
&& echo 'extension=redis.so' > /usr/local/etc/php/conf.d/pecl-redis.ini \
&& echo 'extension=memcached.so' > /usr/local/etc/php/conf.d/pecl-memcached.ini \
&& curl -s -o wp-cli.phar 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar' \
&& chmod +x wp-cli.phar \
&& mv wp-cli.phar /usr/local/bin/wp \
&& wp core download --path=/var/www/html/ --version=4.9.1 --locale=pt_BR --allow-root \
&& curl -s -o /opt/wp-cli/wp-cli.phar 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar' \
&& wp core download --path=/var/www/html/ --version=4.9.1 --locale=pt_BR \
&& { \
echo "file_uploads = On"; \
echo "upload_max_filesize = 2048M"; \
echo "post_max_size = 2048M"; \
echo "max_file_uploads = 20"; \
} > /usr/local/etc/php/conf.d/wordpress-uploads.ini
COPY docker-entrypoint.sh /entrypoint.sh
COPY htaccess /var/www/html/.htaccess
COPY wp-config.php /var/www/html/wp-config.php
RUN chown -R www-data: /var/www/html/ \
} > /usr/local/etc/php/conf.d/wordpress-uploads.ini \
&& chown -R www-data: /var/www/html/ \
&& mkdir -p /docker-entrypoint-extra \
&& mkdir -p /var/www/html/wp-config.d \
&& echo "alias wp='/usr/local/bin/wp --allow-root'" >> /root/.bashrc
ENV PAGER /bin/cat
&& mkdir -p /var/www/html/wp-config.d
EXPOSE 80 443
ENTRYPOINT ["/entrypoint.sh"]
......
#!/bin/bash
PAGER=cat
/usr/local/bin/php /opt/wp-cli/wp-cli.phar --allow-root $@
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment