From c7d2ca95e7404e05ac20686e0ad81c645a2905dd Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Sun, 1 Aug 2021 09:07:43 +0200 Subject: [PATCH] Reduce layers (#3) --- android-arm64/Dockerfile | 11 ++++------- android-armv7/Dockerfile | 11 ++++------- centos7-devtoolset7/Dockerfile | 5 ++--- linux-arm64/Dockerfile | 11 ++++------- linux-armv6/Dockerfile | 11 ++++------- linux-armv7/Dockerfile | 11 ++++------- 6 files changed, 22 insertions(+), 38 deletions(-) diff --git a/android-arm64/Dockerfile b/android-arm64/Dockerfile index f8c4c93..91c7d0a 100644 --- a/android-arm64/Dockerfile +++ b/android-arm64/Dockerfile @@ -1,12 +1,9 @@ FROM dockcross/android-arm64 -RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node -RUN groupadd --gid 2000 travis && useradd --uid 2000 --gid travis --shell /bin/bash --create-home travis - -RUN apt-get -y update && \ - apt-get -y --no-install-recommends install \ - git curl gnupg apt-transport-https \ - && \ +RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node && \ + groupadd --gid 2000 travis && useradd --uid 2000 --gid travis --shell /bin/bash --create-home travis && \ + apt-get -y update && \ + apt-get -y --no-install-recommends install git curl gnupg apt-transport-https && \ curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ echo "deb https://deb.nodesource.com/node_10.x bullseye main" | tee /etc/apt/sources.list.d/nodesource.list && \ echo "deb-src https://deb.nodesource.com/node_10.x bullseye main" | tee -a /etc/apt/sources.list.d/nodesource.list && \ diff --git a/android-armv7/Dockerfile b/android-armv7/Dockerfile index d62871a..04a4899 100644 --- a/android-armv7/Dockerfile +++ b/android-armv7/Dockerfile @@ -1,12 +1,9 @@ FROM dockcross/android-arm -RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node -RUN groupadd --gid 2000 travis && useradd --uid 2000 --gid travis --shell /bin/bash --create-home travis - -RUN apt-get -y update && \ - apt-get -y --no-install-recommends install \ - git curl gnupg apt-transport-https \ - && \ +RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node && \ + groupadd --gid 2000 travis && useradd --uid 2000 --gid travis --shell /bin/bash --create-home travis && \ + apt-get -y update && \ + apt-get -y --no-install-recommends install git curl gnupg apt-transport-https && \ curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ echo "deb https://deb.nodesource.com/node_10.x bullseye main" | tee /etc/apt/sources.list.d/nodesource.list && \ echo "deb-src https://deb.nodesource.com/node_10.x bullseye main" | tee -a /etc/apt/sources.list.d/nodesource.list && \ diff --git a/centos7-devtoolset7/Dockerfile b/centos7-devtoolset7/Dockerfile index 78caff3..facaa2e 100644 --- a/centos7-devtoolset7/Dockerfile +++ b/centos7-devtoolset7/Dockerfile @@ -3,9 +3,8 @@ FROM centos/devtoolset-7-toolchain-centos7:7 USER 0 RUN groupadd -g 1000 node && useradd -g 1000 -u 1000 -m node && \ - groupadd -g 2000 travis && useradd -g 2000 -u 2000 -m travis - -RUN curl -sL https://rpm.nodesource.com/setup_12.x | bash - && \ + groupadd -g 2000 travis && useradd -g 2000 -u 2000 -m travis && \ + curl -sL https://rpm.nodesource.com/setup_12.x | bash - && \ yum install -y make nodejs USER node diff --git a/linux-arm64/Dockerfile b/linux-arm64/Dockerfile index 5f14410..f124a4a 100644 --- a/linux-arm64/Dockerfile +++ b/linux-arm64/Dockerfile @@ -1,12 +1,9 @@ FROM dockcross/linux-arm64 -RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node -RUN groupadd --gid 2000 travis && useradd --uid 2000 --gid travis --shell /bin/bash --create-home travis - -RUN apt-get -y update && \ - apt-get -y --no-install-recommends install \ - git curl gnupg apt-transport-https \ - && \ +RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node && \ + groupadd --gid 2000 travis && useradd --uid 2000 --gid travis --shell /bin/bash --create-home travis && \ + apt-get -y update && \ + apt-get -y --no-install-recommends install git curl gnupg apt-transport-https && \ curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ echo "deb https://deb.nodesource.com/node_10.x bullseye main" | tee /etc/apt/sources.list.d/nodesource.list && \ echo "deb-src https://deb.nodesource.com/node_10.x bullseye main" | tee -a /etc/apt/sources.list.d/nodesource.list && \ diff --git a/linux-armv6/Dockerfile b/linux-armv6/Dockerfile index 97b41fb..7450f5c 100644 --- a/linux-armv6/Dockerfile +++ b/linux-armv6/Dockerfile @@ -1,12 +1,9 @@ FROM dockcross/linux-armv6 -RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node -RUN groupadd --gid 2000 travis && useradd --uid 2000 --gid travis --shell /bin/bash --create-home travis - -RUN apt-get -y update && \ - apt-get -y --no-install-recommends install \ - git curl gnupg apt-transport-https \ - && \ +RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node && \ + groupadd --gid 2000 travis && useradd --uid 2000 --gid travis --shell /bin/bash --create-home travis && \ + apt-get -y update && \ + apt-get -y --no-install-recommends install git curl gnupg apt-transport-https && \ curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ echo "deb https://deb.nodesource.com/node_10.x bullseye main" | tee /etc/apt/sources.list.d/nodesource.list && \ echo "deb-src https://deb.nodesource.com/node_10.x bullseye main" | tee -a /etc/apt/sources.list.d/nodesource.list && \ diff --git a/linux-armv7/Dockerfile b/linux-armv7/Dockerfile index 322fc16..771b6f1 100644 --- a/linux-armv7/Dockerfile +++ b/linux-armv7/Dockerfile @@ -1,12 +1,9 @@ FROM dockcross/linux-armv7 -RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node -RUN groupadd --gid 2000 travis && useradd --uid 2000 --gid travis --shell /bin/bash --create-home travis - -RUN apt-get -y update && \ - apt-get -y --no-install-recommends install \ - git curl gnupg apt-transport-https \ - && \ +RUN groupadd --gid 1000 node && useradd --uid 1000 --gid node --shell /bin/bash --create-home node && \ + groupadd --gid 2000 travis && useradd --uid 2000 --gid travis --shell /bin/bash --create-home travis && \ + apt-get -y update && \ + apt-get -y --no-install-recommends install git curl gnupg apt-transport-https && \ curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \ echo "deb https://deb.nodesource.com/node_10.x bullseye main" | tee /etc/apt/sources.list.d/nodesource.list && \ echo "deb-src https://deb.nodesource.com/node_10.x bullseye main" | tee -a /etc/apt/sources.list.d/nodesource.list && \