Skip to content

Commit f4a9084

Browse files
KingPinKingPin
authored andcommitted
fix(v2): mark Debian runtime libraries as manual before purging dev packages to avoid accidental removal (trixie/bookworm)
1 parent 5705bf8 commit f4a9084

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Dockerfile.v2

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,32 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
154154
rm s6-overlay-noarch.tar.xz s6-overlay-${S6_ARCH}.tar.xz && \
155155
# Clean up build-only packages to reduce image size
156156
if [ "$BASEOS" = "trixie" ] || [ "$BASEOS" = "bookworm" ]; then \
157+
# Mark runtime libraries to keep before purging dev packages
158+
apt-mark manual \
159+
libmemcached11t64 libmemcached11 \
160+
libmagickcore-7.q16-10 libmagickwand-7.q16-10 libmagickcore-6.q16-6 libmagickwand-6.q16-6 \
161+
libvips42t64 \
162+
libvips42 \
163+
libpng16-16t64 \
164+
libpng16-16 \
165+
libavif16 \
166+
libavif15 \
167+
libsnmp40t64 \
168+
libsnmp40 \
169+
librabbitmq4 \
170+
libpq5 \
171+
libzip5 libzip4 \
172+
libicu76 \
173+
libldap2 \
174+
libldap-2.5-0 \
175+
libtidy58 \
176+
libtidy5deb1 \
177+
libxslt1.1 \
178+
libyaml-0-2 \
179+
libuuid1 \
180+
libsnappy1v5 \
181+
libwebp7 \
182+
libxpm4 2>/dev/null || true && \
157183
apt-get purge -y --auto-remove \
158184
build-essential \
159185
libmemcached-dev \

0 commit comments

Comments
 (0)