Skip to content

Commit 804b2b6

Browse files
author
John Astete
committed
updates
1 parent 2e39553 commit 804b2b6

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

Dockerfile.base

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
FROM php:8.4.15-fpm-alpine3.22 AS base
1+
# ============================================
2+
# Stage: base - Essentials
3+
# ============================================
4+
FROM php:8.4-fpm-alpine3.22 AS base
25

36
ENV NGINX_VERSION="~1.28"
47
ENV SUPERVISOR_VERSION="~4.2"
@@ -29,6 +32,7 @@ RUN set -eux; \
2932
\
3033
docker-php-ext-configure zip; \
3134
docker-php-ext-install -j$(nproc) \
35+
bcmath \
3236
intl \
3337
pdo_pgsql \
3438
zip \
@@ -57,6 +61,27 @@ RUN addgroup -g 1000 user-group && \
5761

5862
RUN mkdir -p /var/cache/nginx && chown -R nginx:nginx /var/cache/nginx
5963

60-
FROM base AS ci
64+
# ============================================
65+
# Stage: dev - Development and CI tools
66+
# ============================================
67+
FROM base AS dev
68+
69+
ENV XDEBUG_VERSION="3.4.7"
70+
ENV CHROME_BIN=/usr/bin/chromium-browser
71+
ENV CHROMEDRIVER_PATH=/usr/bin/chromedriver
72+
ENV PANTHER_NO_SANDBOX=1
73+
ENV PANTHER_CHROME_ARGUMENTS="--disable-dev-shm-usage --no-sandbox"
6174

6275
COPY --from=composer:2.9 /usr/bin/composer /usr/local/bin/composer
76+
77+
RUN apk add --no-cache git linux-headers chromium chromium-chromedriver
78+
79+
RUN set -eux; \
80+
apk add --no-cache --virtual .build-deps $PHPIZE_DEPS autoconf dpkg-dev dpkg file g++ gcc libc-dev make; \
81+
pecl channel-update pecl.php.net; \
82+
pecl install xdebug-$XDEBUG_VERSION; \
83+
docker-php-ext-enable xdebug; \
84+
pecl clear-cache; \
85+
apk del .build-deps
86+
87+
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"

0 commit comments

Comments
 (0)