42 lines
1.3 KiB
Docker
42 lines
1.3 KiB
Docker
FROM debian:buster-slim as build
|
|
|
|
RUN apt-get update && \
|
|
apt-get -qy install \
|
|
php-fpm php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip \
|
|
sudo wget curl ca-certificates less &&\
|
|
apt-get clean
|
|
|
|
RUN useradd wordpress -d /app/
|
|
COPY wordpress.conf /etc/php/7.3/fpm/pool.d/www.conf
|
|
RUN mkdir /run/php/
|
|
#RUN mkdir logs
|
|
|
|
#USER wordpress
|
|
WORKDIR app
|
|
RUN wget -O wordpress.tar.gz "https://wordpress.org/latest.tar.gz"
|
|
RUN wget https://wordpress.org/latest.tar.gz
|
|
RUN tar -xzf wordpress.tar.gz
|
|
RUN rm latest.tar.gz
|
|
#ADD wordpress_files/wp-config.php /app/wordpress/wp-config.php
|
|
#ADD wordpress_files/themes/ /app/wordpress/wp-content/themes/
|
|
#ADD wordpress_files/plugins/ /app/wordpress/wp-content/plugins/
|
|
#ADD wordpress_files/sunrise.php /app/wordpress/wp-content/sunrise.php
|
|
RUN chown -R wordpress:wordpress /app/
|
|
|
|
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
|
RUN chmod +x wp-cli.phar
|
|
RUN mv wp-cli.phar wp
|
|
|
|
## ESTO EN UN CRON DAILY
|
|
#RUN sudo -u wordpress -i -- /app/wp theme update --all --path="/app/wordpress/"
|
|
#RUN ./wp plugin update --all --path="/app/wordpress/"
|
|
#RUN ./wp core update --path="/app/wordpress/"
|
|
|
|
#USER root
|
|
|
|
EXPOSE 9000
|
|
VOLUME /app/wordpress
|
|
|
|
CMD ["/usr/sbin/php-fpm7.3","--nodaemonize"]]
|
|
|