@@ -5,8 +5,7 @@ RUN groupadd --gid 1000 node \
55
66ENV NODE_VERSION 10.18.0
77
8- RUN buildDeps='xz-utils' \
9- && ARCH= && dpkgArch="$(dpkg --print-architecture)" \
8+ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
109 && case "${dpkgArch##*-}" in \
1110 amd64) ARCH='x64' ;; \
1211 ppc64el) ARCH='ppc64le' ;; \
@@ -17,7 +16,7 @@ RUN buildDeps='xz-utils' \
1716 *) echo "unsupported architecture" ; exit 1 ;; \
1817 esac \
1918 && set -ex \
20- && apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr $buildDeps --no-install-recommends \
19+ && apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr xz-utils --no-install-recommends \
2120 && rm -rf /var/lib/apt/lists/* \
2221 && for key in \
2322 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
@@ -42,12 +41,15 @@ RUN buildDeps='xz-utils' \
4241 && grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$ " SHASUMS256.txt | sha256sum -c - \
4342 && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
4443 && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
45- && apt-get purge -y --auto-remove $buildDeps \
44+ && apt-mark auto '.*' > /dev/null \
45+ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
4646 && ln -s /usr/local/bin/node /usr/local/bin/nodejs
4747
4848ENV YARN_VERSION 1.21.1
4949
5050RUN set -ex \
51+ && apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr --no-install-recommends \
52+ && rm -rf /var/lib/apt/lists/* \
5153 && for key in \
5254 6A010C5166006599AA17F08146C2130DFD2497F5 \
5355 ; do \
@@ -62,7 +64,9 @@ RUN set -ex \
6264 && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
6365 && ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
6466 && ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
65- && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
67+ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
68+ && apt-mark auto '.*' > /dev/null \
69+ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
6670
6771COPY docker-entrypoint.sh /usr/local/bin/
6872ENTRYPOINT ["docker-entrypoint.sh" ]
0 commit comments