-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfrankenphp.Dockerfile
36 lines (27 loc) · 959 Bytes
/
frankenphp.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM dunglas/frankenphp:1-php8.2
ENV SERVER_NAME=:8080
ARG USER_ID=1000
ARG GROUP_ID=1000
RUN \
groupadd -g ${GROUP_ID} application && \
useradd -u ${USER_ID} -g application -M application && \
setcap -r /usr/local/bin/frankenphp && \
chown -R application:application /data/caddy && chown -R application:application /config/caddy
RUN install-php-extensions \
pdo_mysql \
gd \
intl \
pcntl \
zip \
redis \
xdebug
# Configure xdebug
RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
# Install Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
ARG ENVIRONMENT=development
RUN mv "$PHP_INI_DIR/php.ini-$ENVIRONMENT" "$PHP_INI_DIR/php.ini"
USER application
EXPOSE 8080