Skip to content

Commit 7799d6c

Browse files
authored
Use APCu cache to optimize autoloader (#167)
1 parent bcf18de commit 7799d6c

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

FrankenPHP.Alpine.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,18 @@ RUN apk update; \
7272
brotli \
7373
# Install PHP extensions (included with dunglas/frankenphp)
7474
&& install-php-extensions \
75+
apcu \
7576
bz2 \
7677
pcntl \
7778
mbstring \
7879
bcmath \
7980
sockets \
80-
pgsql \
8181
pdo_pgsql \
8282
opcache \
8383
exif \
8484
pdo_mysql \
8585
zip \
8686
uv \
87-
vips \
8887
intl \
8988
gd \
9089
redis \
@@ -193,7 +192,8 @@ RUN mkdir -p \
193192
bootstrap/cache && chmod -R a+rw storage
194193

195194
RUN composer dump-autoload \
196-
--classmap-authoritative \
195+
--optimize \
196+
--apcu \
197197
--no-dev \
198198
&& composer clear-cache
199199

FrankenPHP.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,18 @@ RUN apt-get update; \
7373
libbrotli-dev \
7474
# Install PHP extensions (included with dunglas/frankenphp)
7575
&& install-php-extensions \
76+
apcu \
7677
bz2 \
7778
pcntl \
7879
mbstring \
7980
bcmath \
8081
sockets \
81-
pgsql \
8282
pdo_pgsql \
8383
opcache \
8484
exif \
8585
pdo_mysql \
8686
zip \
8787
uv \
88-
vips \
8988
intl \
9089
gd \
9190
redis \
@@ -193,7 +192,8 @@ RUN mkdir -p \
193192
bootstrap/cache && chmod -R a+rw storage
194193

195194
RUN composer dump-autoload \
196-
--classmap-authoritative \
195+
--optimize \
196+
--apcu \
197197
--no-dev \
198198
&& composer clear-cache
199199

RoadRunner.Alpine.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,18 @@ RUN apk update; \
5555
brotli \
5656
# Install PHP extensions
5757
&& install-php-extensions \
58+
apcu \
5859
bz2 \
5960
pcntl \
6061
mbstring \
6162
bcmath \
6263
sockets \
63-
pgsql \
6464
pdo_pgsql \
6565
opcache \
6666
exif \
6767
pdo_mysql \
6868
zip \
6969
uv \
70-
vips \
7170
intl \
7271
gd \
7372
redis \
@@ -176,7 +175,8 @@ RUN mkdir -p \
176175
bootstrap/cache && chmod -R a+rw storage
177176

178177
RUN composer dump-autoload \
179-
--classmap-authoritative \
178+
--optimize \
179+
--apcu \
180180
--no-dev \
181181
&& composer clear-cache
182182

RoadRunner.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,18 @@ RUN apt-get update; \
5454
libbrotli-dev \
5555
# Install PHP extensions
5656
&& install-php-extensions \
57+
apcu \
5758
bz2 \
5859
pcntl \
5960
mbstring \
6061
bcmath \
6162
sockets \
62-
pgsql \
6363
pdo_pgsql \
6464
opcache \
6565
exif \
6666
pdo_mysql \
6767
zip \
6868
uv \
69-
vips \
7069
intl \
7170
gd \
7271
redis \
@@ -174,7 +173,8 @@ RUN mkdir -p \
174173
bootstrap/cache && chmod -R a+rw storage
175174

176175
RUN composer dump-autoload \
177-
--classmap-authoritative \
176+
--optimize \
177+
--apcu \
178178
--no-dev \
179179
&& composer clear-cache
180180

Swoole.Alpine.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,18 @@ RUN apk update; \
5555
brotli \
5656
# Install PHP extensions
5757
&& install-php-extensions \
58+
apcu \
5859
bz2 \
5960
pcntl \
6061
mbstring \
6162
bcmath \
6263
sockets \
63-
pgsql \
6464
pdo_pgsql \
6565
opcache \
6666
exif \
6767
pdo_mysql \
6868
zip \
6969
uv \
70-
vips \
7170
intl \
7271
gd \
7372
redis \
@@ -176,7 +175,8 @@ RUN mkdir -p \
176175
bootstrap/cache && chmod -R a+rw storage
177176

178177
RUN composer dump-autoload \
179-
--classmap-authoritative \
178+
--optimize \
179+
--apcu \
180180
--no-dev \
181181
&& composer clear-cache
182182

Swoole.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,18 @@ RUN apt-get update; \
5454
libbrotli-dev \
5555
# Install PHP extensions
5656
&& install-php-extensions \
57+
apcu \
5758
bz2 \
5859
pcntl \
5960
mbstring \
6061
bcmath \
6162
sockets \
62-
pgsql \
6363
pdo_pgsql \
6464
opcache \
6565
exif \
6666
pdo_mysql \
6767
zip \
6868
uv \
69-
vips \
7069
intl \
7170
gd \
7271
redis \
@@ -174,7 +173,8 @@ RUN mkdir -p \
174173
bootstrap/cache && chmod -R a+rw storage
175174

176175
RUN composer dump-autoload \
177-
--classmap-authoritative \
176+
--optimize \
177+
--apcu \
178178
--no-dev \
179179
&& composer clear-cache
180180

static-build.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,18 @@ RUN apt-get update; \
7373
libbrotli-dev \
7474
# Install PHP extensions (included with dunglas/frankenphp)
7575
&& install-php-extensions \
76+
apcu \
7677
bz2 \
7778
pcntl \
7879
mbstring \
7980
bcmath \
8081
sockets \
81-
pgsql \
8282
pdo_pgsql \
8383
opcache \
8484
exif \
8585
pdo_mysql \
8686
zip \
8787
uv \
88-
vips \
8988
intl \
9089
gd \
9190
redis \
@@ -193,7 +192,8 @@ RUN mkdir -p \
193192
bootstrap/cache && chmod -R a+rw storage
194193

195194
RUN composer dump-autoload \
196-
--classmap-authoritative \
195+
--optimize \
196+
--apcu \
197197
--no-dev \
198198
&& composer clear-cache
199199

0 commit comments

Comments
 (0)