Commit 08171ff2 authored by Fabio Montefuscolo's avatar Fabio Montefuscolo

fix missing php path and simplify Dockerfile

parent 72fb7e78
......@@ -3,25 +3,18 @@ MAINTAINER Fabio Montefuscolo <fabio.montefuscolo@gmail.com>
RUN curl -s -o wp-cli.phar 'https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar?0.25' \
&& chmod +x wp-cli.phar \
&& mv wp-cli.phar /usr/local/bin/wp
RUN wp core download --path=/var/www/html/ --version=4.7.3 --locale=pt_BR --allow-root
&& mv wp-cli.phar /usr/local/bin/wp \
&& wp core download --path=/var/www/html/ --version=4.7.3 --locale=pt_BR --allow-root
COPY docker-entrypoint.sh /entrypoint.sh
COPY htaccess /var/www/html/.htaccess
COPY wp-config.php /var/www/html/wp-config.php
RUN useradd --no-create-home --no-user-group --groups www-data wordpress
RUN chown -R wordpress:root /var/www/html/ \
&& chown -R wordpress:www-data /var/www/html/wp-content \
&& find /var/www/html/wp-content -type d -exec chmod 775 {} \; \
&& find /var/www/html/wp-content -type f -exec chmod 664 {} \;
RUN mkdir -p /docker-entrypoint-extra/
COPY docker-entrypoint.sh /entrypoint.sh
RUN chown -R www-data: /var/www/html/ \
&& mkdir -p /docker-entrypoint-extra \
&& echo "alias wp='/usr/local/bin/wp --allow-root'" >> /root/.bashrc
# `wp-cli --help` will use cat
ENV PAGER /bin/cat
RUN echo "alias wp='/usr/local/bin/wp --allow-root'" >> /root/.bashrc
EXPOSE 80 443
ENTRYPOINT ["/entrypoint.sh"]
......
......@@ -83,10 +83,11 @@ else
fi
php=`which php`;
for f in /docker-entrypoint-extra/*; do
case "$f" in
*.sh) echo "$0: running $f"; . "$f" ;;
*.php) echo "$0: running $f"; "${PHP}" < "$f" ;;
*.php) echo "$0: running $f"; "${php}" < "$f" ;;
*) echo "$0: ignoring $f" ;;
esac
echo
......
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