Skip to content

Commit 00a3985

Browse files
committed
Move most installs to the base layer
This means it will be beefier, but putting all that beef earlier means it can be downloaded earlier, slightly optimizing our download times.
1 parent 66c89d3 commit 00a3985

File tree

2 files changed

+28
-26
lines changed

2 files changed

+28
-26
lines changed

Dockerfile-nts-alpine

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,18 @@ LABEL org.label-schema.title="Opinionated ReactPHP optimised PHP Docker images"
2727

2828
RUN set -x \
2929
&& apk upgrade --no-cache \
30-
&& apk add --no-cache moreutils make \
30+
&& apk add --no-cache \
31+
moreutils \
32+
make \
33+
libuv-dev \
34+
zlib-dev \
35+
icu-dev \
36+
libevent-dev \
37+
openssl-dev \
38+
bash \
39+
coreutils \
40+
procps \
41+
git \
3142
&& addgroup -g 1000 app \
3243
&& adduser -u 1000 -D -G app app --home /opt/app \
3344
&& touch /.you-are-in-a-wyrihaximus.net-php-docker-image
@@ -64,17 +75,7 @@ COPY --from=ghcr.io/php/pie:1.2.1-bin /pie /usr/bin/pie
6475

6576
RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
6677
mv /*.so "$EXTENSION_DIR/" && \
67-
apk add --no-cache \
68-
libuv-dev \
69-
zlib-dev \
70-
icu-dev \
71-
libevent-dev \
72-
openssl-dev \
73-
bash \
74-
coreutils \
75-
procps \
76-
git \
77-
$PHPIZE_DEPS \
78+
apk add --no-cache $PHPIZE_DEPS \
7879
## Install PECL
7980
&& wget -q pear.php.net/go-pear.phar && php go-pear.phar \
8081
&& install-php-extensions pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache intl sockets ffi opentelemetry \

Dockerfile-zts-alpine

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,20 @@ LABEL org.label-schema.title="Opinionated ReactPHP optimised PHP Docker images"
2727

2828
RUN set -x \
2929
&& apk upgrade --no-cache \
30-
&& apk add --no-cache moreutils make \
30+
&& apk add --no-cache \
31+
moreutils \
32+
make \
33+
libuv-dev \
34+
zlib-dev \
35+
icu-dev \
36+
libevent-dev \
37+
openssl-dev \
38+
git \
39+
openssh-client \
40+
bash \
41+
coreutils \
42+
procps \
43+
git \
3144
&& addgroup -g 1000 app \
3245
&& adduser -u 1000 -D -G app app --home /opt/app \
3346
&& touch /.you-are-in-a-wyrihaximus.net-php-docker-image
@@ -65,19 +78,7 @@ COPY --from=ghcr.io/php/pie:1.2.1-bin /pie /usr/bin/pie
6578
RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
6679
rm /usr/local/etc/php/conf.d/jit.ini && \
6780
mv /*.so "$EXTENSION_DIR/" && \
68-
apk add --no-cache \
69-
libuv-dev \
70-
zlib-dev \
71-
icu-dev \
72-
libevent-dev \
73-
openssl-dev \
74-
git \
75-
openssh-client \
76-
bash \
77-
coreutils \
78-
procps \
79-
git \
80-
$PHPIZE_DEPS \
81+
apk add --no-cache $PHPIZE_DEPS \
8182
## Install PECL
8283
&& wget -q pear.php.net/go-pear.phar && php go-pear.phar \
8384
&& install-php-extensions pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache intl sockets ffi opentelemetry \

0 commit comments

Comments
 (0)