Skip to content

Commit 6fce3ff

Browse files
author
david_smith
committed
Update Dockerfile to php:8.4-alpine.
1 parent fb4e1b9 commit 6fce3ff

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

docker/8.4/Dockerfile

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
FROM php:8.4-cli AS builder
1+
FROM php:8.4-alpine AS builder
22

3-
RUN apt-get update && apt-get install -y --no-install-recommends \
3+
RUN apk add --no-cache \
44
git \
55
unzip \
6-
$PHPIZE_DEPS \
7-
&& rm -rf /var/lib/apt/lists/*
6+
$PHPIZE_DEPS
87

98
RUN git config --global --add safe.directory /app
109

@@ -14,18 +13,17 @@ FROM builder AS composer
1413

1514
RUN curl -sS https://getcomposer.org/installer | php -- \
1615
--install-dir=/usr/local/bin \
17-
--filename=composer \
18-
&& chmod +x /usr/local/bin/composer
16+
--filename=composer
1917

2018
FROM builder AS debug
2119

22-
RUN pecl channel-update pecl.php.net \
23-
&& pecl install xdebug \
24-
&& docker-php-ext-enable xdebug \
25-
&& apt-get purge -y --auto-remove $PHPIZE_DEPS \
26-
&& rm -rf /tmp/* /var/lib/apt/lists/*
20+
RUN apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS \
21+
&& pecl channel-update pecl.php.net \
22+
&& pecl install xdebug-2.9.8 \
23+
&& docker-php-ext-enable xdebug \
24+
&& apk del .phpize-deps
2725

28-
FROM php:8.4-cli AS base
26+
FROM php:8.4-alpine AS base
2927

3028
WORKDIR /app
3129

0 commit comments

Comments
 (0)