-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
25 lines (21 loc) · 972 Bytes
/
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
FROM php:8.4.3-alpine3.21
ENV TIMEZONE=America/Los_Angeles
ENV COMPOSER_DISABLE_XDEBUG_WARN=1
SHELL ["/bin/ash", "-exo", "pipefail", "-c"]
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" \
&& sed -i -E 's/^expose_php = On/expose_php = Off/' $PHP_INI_DIR/php.ini-production \
&& sed -i -E "s|^.?date.timezone =.*|date.timezone = ${TIMEZONE}|g" $PHP_INI_DIR/php.ini* \
&& apk add --no-cache --update linux-headers \
&& apk add --no-cache tzdata \
&& cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
&& echo $TIMEZONE > /etc/timezone \
&& apk add --no-cache git \
&& apk add --no-cache $PHPIZE_DEPS \
&& pecl install xdebug-3.4.1 \
&& docker-php-ext-enable xdebug \
&& apk del --purge $PHPIZE_DEPS \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& git config --global --add safe.directory /app
WORKDIR /app
COPY . /app
CMD ["php", "-a"]