Skip to content

Commit

Permalink
apt-mark manual
Browse files Browse the repository at this point in the history
  • Loading branch information
tuler committed Oct 4, 2023
1 parent 2bd529c commit 2054bf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
16 changes: 2 additions & 14 deletions 18/jammy-slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 2 additions & 14 deletions 20/jammy-slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2054bf5

Please sign in to comment.