2022-12-09 03:40:02 +01:00
|
|
|
FROM debian:stable-slim
|
2021-03-17 00:09:04 +01:00
|
|
|
|
|
|
|
RUN apt-get update && \
|
2022-12-09 03:40:02 +01:00
|
|
|
apt-get -qy install \
|
|
|
|
php-fpm php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip php-redis \
|
|
|
|
wget sed curl tar ca-certificates less \
|
|
|
|
mariadb-client && \
|
2021-03-17 00:09:04 +01:00
|
|
|
apt-get clean
|
|
|
|
|
2022-12-09 03:40:02 +01:00
|
|
|
|
|
|
|
COPY config/php-fpm-wordpress.conf /tmp/www.conf
|
|
|
|
|
|
|
|
RUN PHP_VERSION=$(php --version | head -n 1 | cut -f2 -d" " | cut -f1,2 -d".") && \
|
|
|
|
cp /tmp/www.conf /etc/php/$PHP_VERSION/fpm/pool.d/www.conf && \
|
|
|
|
mkdir /run/php/ && \
|
|
|
|
ln -s /usr/sbin/php-fpm$PHP_VERSION /usr/sbin/php-fpm && \
|
|
|
|
sed -i '/^error_log/cerror_log = /app/log/php-fpm.log' /etc/php/$PHP_VERSION/fpm/php-fpm.conf && \
|
|
|
|
sed -i '/^pid/cpid = /app/log/php-fpm.pid' /etc/php/$PHP_VERSION/fpm/php-fpm.conf
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
RUN curl -s -O 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
|
|
|
|
|
|
|
|
ADD wordpress /tmp/wordpress
|
|
|
|
|
|
|
|
ADD entrypoint.sh /entrypoint.sh
|
2021-03-17 00:09:04 +01:00
|
|
|
|
|
|
|
EXPOSE 9000
|
|
|
|
|
2022-12-09 03:40:02 +01:00
|
|
|
VOLUME /app
|
|
|
|
|
|
|
|
ENTRYPOINT ["/bin/sh","/entrypoint.sh"]
|
2021-03-17 00:09:04 +01:00
|
|
|
|
2022-12-09 03:40:02 +01:00
|
|
|
CMD ["/usr/sbin/php-fpm","--nodaemonize","-O"]
|