From a13f567fe96b26c048c26542de27bc9b074aa395 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 3 Jan 2018 12:44:57 -0800 Subject: [PATCH] Adjust usage of apt-mark slightly --- Dockerfile | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 39047ba..7bc0299 100644 --- a/Dockerfile +++ b/Dockerfile @@ -121,18 +121,16 @@ RUN set -eux; \ cd /; \ rm -rf /usr/src/qemu; \ \ - libs="$( \ - find /usr/local -type f -executable -exec ldd '{}' ';' \ - | awk '/=>/ { print $(NF-1) }' \ - | sort -u \ - | xargs dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - )"; \ - savedAptMark="$savedAptMark $libs"; \ - \ apt-mark auto '.*' > /dev/null; \ [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + find /usr/local -type f -executable -exec ldd '{}' ';' \ + | awk '/=>/ { print $(NF-1) }' \ + | sort -u \ + | xargs -r dpkg-query --search \ + | cut -d: -f1 \ + | sort -u \ + | xargs -r apt-mark manual \ + ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false STOPSIGNAL SIGHUP