From 625f89926ed28d7dceb29991dfa04c6536a6a7b2 Mon Sep 17 00:00:00 2001 From: Konstantin Demin Date: Mon, 10 Apr 2023 08:07:23 +0300 Subject: [PATCH] minor image cleanup Signed-off-by: Konstantin Demin --- Dockerfile-alpine.template | 8 ++++++-- Dockerfile-debian.template | 8 ++++++-- Dockerfile-slim.template | 8 ++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index c2e2c5a5a9..e671ef7855 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -59,7 +59,9 @@ RUN addgroup -g 1000 node \ && apk del .build-deps \ # smoke tests && node --version \ - && npm --version + && npm --version \ + # cleanup + && rm -rf /root/.gnupg /root/.npm ENV YARN_VERSION 0.0.0 @@ -80,7 +82,9 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && apk del .build-deps-yarn \ # smoke test - && yarn --version + && yarn --version \ + # cleanup + && rm -rf /root/.gnupg /tmp/v8-compile-cache-* COPY docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 17962567fa..62654d8b3a 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -32,7 +32,9 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ # smoke tests && node --version \ - && npm --version + && npm --version \ + # cleanup + && rm -rf /root/.gnupg /root/.npm ENV YARN_VERSION 0.0.0 @@ -52,7 +54,9 @@ RUN set -ex \ && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ # smoke test - && yarn --version + && yarn --version \ + # cleanup + && rm -rf /root/.gnupg /tmp/v8-compile-cache-* COPY docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index aa7816d963..8c9a79fe69 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -43,7 +43,9 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ # smoke tests && node --version \ - && npm --version + && npm --version \ + # cleanup + && rm -rf /root/.gnupg /root/.npm ENV YARN_VERSION 0.0.0 @@ -76,7 +78,9 @@ RUN set -ex \ | xargs -r apt-mark manual \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ # smoke test - && yarn --version + && yarn --version \ + # cleanup + && rm -rf /root/.gnupg /tmp/v8-compile-cache-* COPY docker-entrypoint.sh /usr/local/bin/ ENTRYPOINT ["docker-entrypoint.sh"]