wordpress/Dockerfile

30 lines
1.0 KiB
Docker
Raw Permalink Normal View History

2017-12-17 13:18:10 +00:00
# NAME leenooks/wordpress
2023-05-26 06:44:34 +00:00
# VERSION 6.2-fpm
2017-12-07 04:19:02 +00:00
2023-05-26 06:44:34 +00:00
FROM wordpress:6.2-fpm-alpine
2017-12-13 10:54:20 +00:00
# Change to http respositories, so they we can cache the install packages
RUN if [ -n ${HTTP_PROXY} ] ; then sed -i -e s'/https/http/' /etc/apk/repositories; fi
# Tune PHP
RUN sed -e 's/^expose_php = On/expose_php = Off/' /usr/local/etc/php/php.ini-production > /usr/local/etc/php/php.ini
RUN sed -i -e 's#^;sendmail_path =#sendmail_path = "/usr/bin/msmtp -t"#' /usr/local/etc/php/php.ini
RUN adduser -g "Hosting Admin User" -u 1000 -G www-data -h /var/www/html -HD lamp
2017-12-13 10:54:20 +00:00
# Base
RUN apk add --no-cache unzip zlib nginx msmtp
RUN curl -SLo /usr/local/bin/wait-for-it https://github.com/vishnubob/wait-for-it/raw/master/wait-for-it.sh && chmod +x /usr/local/bin/wait-for-it
COPY msmtprc /etc/
COPY docker/www.conf /usr/local/etc/php-fpm.d/
COPY docker/nginx-app.conf /etc/nginx/http.d/default.conf
2017-12-13 10:54:20 +00:00
COPY docker/init /sbin/
COPY update /usr/local/sbin
RUN chmod 550 /sbin/init && chown 0:0 /sbin/init
2018-02-02 10:14:10 +00:00
WORKDIR /var/www/html
EXPOSE 80
2019-05-03 13:40:23 +00:00
ENTRYPOINT [ "/sbin/init" ]
2018-02-02 10:14:10 +00:00
CMD [ "php-fpm" ]