Skip to content

Commit

Permalink
Merge pull request #178 from martialblog/extend-apt-mark
Browse files Browse the repository at this point in the history
Improve removal of dev packages
  • Loading branch information
martialblog authored Nov 10, 2023
2 parents ef3fab2 + 8b727d9 commit 7f9fb7c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 6.0/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ RUN set -ex; \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '$3 ~ /^\/lib/ { print "/usr"$3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
Expand Down
7 changes: 7 additions & 0 deletions 6.0/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ RUN set -ex; \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '$3 ~ /^\/lib/ { print "/usr"$3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit 7f9fb7c

Please sign in to comment.