docker-wordpress-universal/Dockerfile

43 lines
1.3 KiB
Docker
Raw Permalink Normal View History

2023-03-28 16:27:18 +02:00
FROM debian:bullseye-slim as build
2021-03-17 00:09:04 +01:00
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 \
2021-03-17 00:19:19 +01:00
sudo wget curl ca-certificates&&\
2021-03-17 00:09:04 +01:00
apt-get clean
RUN useradd wordpress
2023-03-28 16:27:18 +02:00
COPY wordpress.conf /etc/php/7.4/fpm/pool.d/www.conf
2021-03-17 00:09:04 +01:00
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/wordpress
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 /app/wp theme update --all --path="/app/wordpress/"
#RUN ./wp plugin update --all --path="/app/wordpress/"
#RUN ./wp core update --all --path="/app/wordpress/"
#USER root
EXPOSE 9000
2021-03-17 01:24:20 +01:00
VOLUME /app/wordpress
2021-03-17 00:09:04 +01:00
2023-03-28 16:27:18 +02:00
CMD ["/usr/sbin/php-fpm7.4","--nodaemonize"]]
2021-03-17 00:09:04 +01:00