Skip to content

Commit 46b01bf

Browse files
committed
Debian Trixie
1 parent 1a3faf9 commit 46b01bf

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

Dockerfile-debian.template

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ RUN set -ex; \
4444
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
4545
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
4646
| sort -u \
47-
| xargs -r dpkg-query --search \
48-
| cut -d: -f1 \
47+
| xargs -rt dpkg-query --search \
48+
# https://manpages.debian.org/trixie/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file)
49+
| awk 'sub(":$", "", $1) { print $1 }' \
4950
| sort -u \
5051
| xargs -rt apt-mark manual; \
5152
\
5253
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
53-
rm -rf /var/lib/apt/lists/*
54+
apt-get dist-clean
5455

5556
# set recommended PHP.ini settings
5657
# see https://secure.php.net/manual/en/opcache.installation.php
@@ -86,7 +87,7 @@ RUN set -ex; \
8687
tar -xzf matomo.tar.gz -C /usr/src/; \
8788
rm matomo.tar.gz; \
8889
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
89-
rm -rf /var/lib/apt/lists/*
90+
apt-get dist-clean
9091

9192
COPY php.ini /usr/local/etc/php/conf.d/php-matomo.ini
9293

apache/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ RUN set -ex; \
4444
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
4545
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
4646
| sort -u \
47-
| xargs -r dpkg-query --search \
48-
| cut -d: -f1 \
47+
| xargs -rt dpkg-query --search \
48+
# https://manpages.debian.org/trixie/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file)
49+
| awk 'sub(":$", "", $1) { print $1 }' \
4950
| sort -u \
5051
| xargs -rt apt-mark manual; \
5152
\
5253
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
53-
rm -rf /var/lib/apt/lists/*
54+
apt-get dist-clean
5455

5556
# set recommended PHP.ini settings
5657
# see https://secure.php.net/manual/en/opcache.installation.php
@@ -86,7 +87,7 @@ RUN set -ex; \
8687
tar -xzf matomo.tar.gz -C /usr/src/; \
8788
rm matomo.tar.gz; \
8889
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
89-
rm -rf /var/lib/apt/lists/*
90+
apt-get dist-clean
9091

9192
COPY php.ini /usr/local/etc/php/conf.d/php-matomo.ini
9293

fpm/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ RUN set -ex; \
4444
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
4545
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
4646
| sort -u \
47-
| xargs -r dpkg-query --search \
48-
| cut -d: -f1 \
47+
| xargs -rt dpkg-query --search \
48+
# https://manpages.debian.org/trixie/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file)
49+
| awk 'sub(":$", "", $1) { print $1 }' \
4950
| sort -u \
5051
| xargs -rt apt-mark manual; \
5152
\
5253
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
53-
rm -rf /var/lib/apt/lists/*
54+
apt-get dist-clean
5455

5556
# set recommended PHP.ini settings
5657
# see https://secure.php.net/manual/en/opcache.installation.php
@@ -86,7 +87,7 @@ RUN set -ex; \
8687
tar -xzf matomo.tar.gz -C /usr/src/; \
8788
rm matomo.tar.gz; \
8889
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
89-
rm -rf /var/lib/apt/lists/*
90+
apt-get dist-clean
9091

9192
COPY php.ini /usr/local/etc/php/conf.d/php-matomo.ini
9293

0 commit comments

Comments
 (0)