refund-form/Dockerfile
Matthias Hemmerich 196aab2ede remove healthcheck
2023-06-23 14:18:14 +02:00

40 lines
1.2 KiB
Docker

ARG ALPINE_VERSION=3.18
FROM alpine:${ALPINE_VERSION}
LABEL Maintainer="Matthias Hemmerich matthias+code@mailbro.de"
LABEL Description="Forked from https://github.com/TrafeX/docker-php-nginx, Lightweight container with Nginx 1.20 & PHP 8.0 based on Alpine Linux."
# Setup document root
WORKDIR /var/www/html
# Install packages
RUN apk update \
&& apk add --no-cache \
curl \
nginx \
php82 \
php82-fpm \
supervisor \
php --version
# Configure nginx
COPY config/nginx.conf /etc/nginx/nginx.conf
# Configure PHP-FPM
COPY config/fpm-pool.conf /etc/php82/php-fpm.d/www.conf
COPY config/php.ini /etc/php82/conf.d/custom.ini
# Configure supervisord
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Make sure files/folders needed by the processes are accessable when they run under the nobody user
RUN chown -R nobody.nobody /var/www/html /run /var/lib/nginx /var/log/nginx
# Switch to use a non-root user from here on
USER nobody
# Add application
COPY --chown=nobody app/ /var/www/html/
# Expose the port nginx is reachable on
EXPOSE 80
# Let supervisord start nginx & php-fpm
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]