FROM wordpress:5.9-fpm ENV TMP /tmp/nginx-php/ RUN apt-get update && apt-get install -y --no-install-recommends nginx # php configs COPY www.conf /usr/local/etc/php-fpm.d/www.conf COPY docker-php.ini /usr/local/etc/php/conf.d/docker-php.ini # nginx configs COPY nginx /etc/nginx # source code COPY htdocs /var/www/html COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh WORKDIR /var/www EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] ENTRYPOINT ["/entrypoint.sh"]