From 2054bf551578017d112cbc845387e462416156f9 Mon Sep 17 00:00:00 2001 From: Danilo Tuler Date: Wed, 17 May 2023 22:57:20 -0300 Subject: [PATCH] apt-mark manual --- 18/jammy-slim/Dockerfile | 16 ++-------------- 20/jammy-slim/Dockerfile | 16 ++-------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/18/jammy-slim/Dockerfile b/18/jammy-slim/Dockerfile index 7622ab704..84ff34175 100644 --- a/18/jammy-slim/Dockerfile +++ b/18/jammy-slim/Dockerfile @@ -42,13 +42,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt \ && apt-mark auto '.*' > /dev/null \ - && 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-mark manual libatomic1 libc6 libstdc++6 libgcc-s1 \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ # smoke tests @@ -77,13 +71,7 @@ RUN set -ex \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && apt-mark auto '.*' > /dev/null \ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; } \ - && 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-mark manual libatomic1 libc6 libstdc++6 libgcc-s1 \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ # smoke test && yarn --version diff --git a/20/jammy-slim/Dockerfile b/20/jammy-slim/Dockerfile index e8af0ab16..e9dbb6bd1 100644 --- a/20/jammy-slim/Dockerfile +++ b/20/jammy-slim/Dockerfile @@ -42,13 +42,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \ && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt \ && apt-mark auto '.*' > /dev/null \ - && 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-mark manual libatomic1 libc6 libstdc++6 libgcc-s1 \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ # smoke tests @@ -77,13 +71,7 @@ RUN set -ex \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && apt-mark auto '.*' > /dev/null \ && { [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; } \ - && 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-mark manual libatomic1 libc6 libstdc++6 libgcc-s1 \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ # smoke test && yarn --version