2022-04-20 00:07:09 +02:00
|
|
|
# Engelsystem PHP FPM/Nginx development image including Xdebug
|
2022-12-10 21:31:20 +01:00
|
|
|
FROM php:8.2-fpm-alpine AS es_base
|
2019-10-14 23:36:26 +02:00
|
|
|
WORKDIR /var/www
|
2022-12-11 10:10:06 +01:00
|
|
|
RUN apk add --no-cache icu-dev linux-headers $PHPIZE_DEPS && \
|
2019-11-30 22:31:34 +01:00
|
|
|
pecl install pcov xdebug && \
|
2019-10-14 23:36:26 +02:00
|
|
|
docker-php-ext-install intl pdo_mysql && \
|
2019-11-30 22:31:34 +01:00
|
|
|
docker-php-ext-enable pcov xdebug
|
2021-01-03 01:47:39 +01:00
|
|
|
RUN echo -e "xdebug.mode=debug\nxdebug.discover_client_host=1\n" >> /usr/local/etc/php/conf.d/xdebug.ini
|
2019-10-14 23:36:26 +02:00
|
|
|
|
2022-04-20 00:07:09 +02:00
|
|
|
FROM es_base AS es_webserver
|
|
|
|
RUN apk add --no-cache nginx && \
|
|
|
|
sed -i 's/9000/127.0.0.1:9000/' /usr/local/etc/php-fpm.d/zz-docker.conf
|
|
|
|
COPY docker/entrypoint.sh /
|
|
|
|
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
|
|
|
ENTRYPOINT /entrypoint.sh
|
|
|
|
EXPOSE 80
|
|
|
|
|
2019-10-14 23:36:26 +02:00
|
|
|
ENV TRUSTED_PROXIES 10.0.0.0/8,::ffff:10.0.0.0/8,\
|
|
|
|
127.0.0.0/8,::ffff:127.0.0.0/8,\
|
|
|
|
172.16.0.0/12,::ffff:172.16.0.0/12,\
|
|
|
|
192.168.0.0/16,::ffff:192.168.0.0/16,\
|
|
|
|
::1/128,fc00::/7,fec0::/10
|
|
|
|
|
|
|
|
# Engelsystem development workspace
|
|
|
|
# Contains all tools required to build / manage the system
|
2022-04-20 00:07:09 +02:00
|
|
|
FROM es_base AS es_workspace
|
2023-12-30 17:22:32 +01:00
|
|
|
RUN echo 'memory_limit = 1024M' > /usr/local/etc/php/conf.d/docker-php.ini
|
2023-01-29 17:02:53 +01:00
|
|
|
RUN apk add --no-cache gettext git nodejs npm yarn
|
2022-04-12 22:39:43 +02:00
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
2022-04-20 00:07:09 +02:00
|
|
|
ENTRYPOINT php -r 'sleep(PHP_INT_MAX);'
|