Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions php/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ COPY --from=builder /var/lib/php/ /var/lib/php/
RUN \
set -eux \
&& apt-get update \
# dist-upgrade, not upgrade: sid transitions can need package adds/removals to move perl-base; plain upgrade holds it back and perl postinsts break on the skew
&& apt-get dist-upgrade -y --no-install-recommends \
Comment on lines +203 to +204

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🔵 Trivial

Add a recurring cache trigger to both base stages.

If the base and builder layers remain cache hits, Docker can reuse the package-upgrade RUN layer without checking current APT state. (docs.docker.com) Add and vary a cache argument for both base images, or schedule no-cache rebuilds. Also verify that CI varies the existing CACHE_BUSTER argument in the derived images.

  • php/base/Dockerfile#L203-L204: add the cache trigger for the PHP base refresh.
  • php/zts-base/Dockerfile#L191-L192: add the cache trigger for the PHP ZTS base refresh.
📍 Affects 2 files
  • php/base/Dockerfile#L203-L204 (this comment)
  • php/zts-base/Dockerfile#L191-L192
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@php/base/Dockerfile` around lines 203 - 204, Add and vary a cache-busting
build argument before the package-refresh RUN instruction in php/base/Dockerfile
lines 203-204 and php/zts-base/Dockerfile lines 191-192, ensuring both base
stages invalidate their APT upgrade layers. Also verify CI varies the existing
CACHE_BUSTER argument for derived images.

&& apt-get install -y --no-install-recommends --allow-downgrades \
libxml2 libssl3t64 libsqlite3-0 libbz2-1.0 libidn2-0 \
zstd libbrotli1 libpsl5t64 libgsasl18 rtmpdump librtmp1 libnghttp3-9 nghttp2 \
Expand Down
3 changes: 2 additions & 1 deletion php/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ COPY --from=builder /var/lib/php/ /var/lib/php/
RUN \
set -eux \
&& apt-get update \
&& apt-get upgrade -y \
# dist-upgrade, not upgrade: sid transitions can need package adds/removals to move perl-base; plain upgrade holds it back and perl postinsts break on the skew
&& apt-get dist-upgrade -y --no-install-recommends \
&& apt-get install -y --no-install-recommends --allow-downgrades \
libpng16-16t64 libjpeg62-turbo libbrotli1 libwebp7 libfreetype6 \
libevent-2.1-7t64 libevent-core-2.1-7t64 libevent-extra-2.1-7t64 libevent-openssl-2.1-7t64 libevent-pthreads-2.1-7t64 \
Expand Down
2 changes: 2 additions & 0 deletions php/franken-testing/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ COPY php/ini/opcache.no-jit.ini /usr/local/etc/php/conf.d/docker-php-ext-opca
RUN \
set -eux \
&& apt-get update \
# dist-upgrade, not upgrade: sid transitions can need package adds/removals to move perl-base; plain upgrade holds it back and perl postinsts break on the skew
&& apt-get dist-upgrade -y --no-install-recommends \
&& apt-get install -y --no-install-recommends --allow-downgrades \
libcap2-bin libstdc++6 \
&& apt-get autoremove -y --purge \
Expand Down
3 changes: 2 additions & 1 deletion php/franken/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ COPY php/ini/opcache.ini /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
RUN \
set -eux \
&& apt-get update \
&& apt-get upgrade -y \
# dist-upgrade, not upgrade: sid transitions can need package adds/removals to move perl-base; plain upgrade holds it back and perl postinsts break on the skew
&& apt-get dist-upgrade -y --no-install-recommends \
&& apt-get install -y --no-install-recommends --allow-downgrades \
libcap2-bin libstdc++6 \
&& apt-get autoremove -y --purge \
Expand Down
2 changes: 2 additions & 0 deletions php/testing/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ COPY --from=composer:2 /usr/bin/composer /usr/bin/
RUN \
set -eux \
&& apt-get update \
# dist-upgrade, not upgrade: sid transitions can need package adds/removals to move perl-base; plain upgrade holds it back and perl postinsts break on the skew
&& apt-get dist-upgrade -y --no-install-recommends \
&& apt-get autoremove -y --purge \
&& rm -rf /var/cache/apt/* /var/lib/apt/lists/* /var/log/* /tmp/* /var/tmp/* \
&& ldconfig \
Expand Down
2 changes: 2 additions & 0 deletions php/zts-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ COPY --from=builder /var/lib/php/ /var/lib/php/
RUN \
set -eux \
&& apt-get update \
# dist-upgrade, not upgrade: sid transitions can need package adds/removals to move perl-base; plain upgrade holds it back and perl postinsts break on the skew
&& apt-get dist-upgrade -y --no-install-recommends \
&& apt-get install -y --no-install-recommends --allow-downgrades \
libxml2 libssl3t64 libsqlite3-0 libbz2-1.0 libidn2-0 \
zstd libbrotli1 libpsl5t64 libgsasl18 rtmpdump librtmp1 libnghttp3-9 nghttp2 \
Expand Down
2 changes: 2 additions & 0 deletions php/zts-testing/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ COPY --from=composer:2 /usr/bin/composer /usr/bin/
RUN \
set -eux \
&& apt-get update \
# dist-upgrade, not upgrade: sid transitions can need package adds/removals to move perl-base; plain upgrade holds it back and perl postinsts break on the skew
&& apt-get dist-upgrade -y --no-install-recommends \
&& apt-get autoremove -y --purge \
&& rm -rf /var/cache/apt/* /var/lib/apt/lists/* /var/log/* /tmp/* /var/tmp/* \
&& ldconfig \
Expand Down
3 changes: 2 additions & 1 deletion php/zts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ COPY --from=builder /var/lib/php/ /var/lib/php/
RUN \
set -eux \
&& apt-get update \
&& apt-get upgrade -y \
# dist-upgrade, not upgrade: sid transitions can need package adds/removals to move perl-base; plain upgrade holds it back and perl postinsts break on the skew
&& apt-get dist-upgrade -y --no-install-recommends \
&& apt-get install -y --no-install-recommends --allow-downgrades \
libpng16-16t64 libjpeg62-turbo libbrotli1 libwebp7 libfreetype6 \
libevent-2.1-7t64 libevent-core-2.1-7t64 libevent-extra-2.1-7t64 libevent-openssl-2.1-7t64 libevent-pthreads-2.1-7t64 \
Expand Down
Loading