Skip to content

Commit add2e3f

Browse files
authored
fix: uninstall download helpers from slim image
2 parents 44c2177 + f99660d commit add2e3f

File tree

8 files changed

+72
-40
lines changed

8 files changed

+72
-40
lines changed

10/buster-slim/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ RUN groupadd --gid 1000 node \
55

66
ENV 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

4848
ENV YARN_VERSION 1.21.1
4949

5050
RUN 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

6771
COPY docker-entrypoint.sh /usr/local/bin/
6872
ENTRYPOINT ["docker-entrypoint.sh"]

10/jessie-slim/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ RUN groupadd --gid 1000 node \
55

66
ENV 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

4848
ENV YARN_VERSION 1.21.1
4949

5050
RUN 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

6771
COPY docker-entrypoint.sh /usr/local/bin/
6872
ENTRYPOINT ["docker-entrypoint.sh"]

10/stretch-slim/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ RUN groupadd --gid 1000 node \
55

66
ENV 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

4848
ENV YARN_VERSION 1.21.1
4949

5050
RUN 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

6771
COPY docker-entrypoint.sh /usr/local/bin/
6872
ENTRYPOINT ["docker-entrypoint.sh"]

12/buster-slim/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ RUN groupadd --gid 1000 node \
55

66
ENV NODE_VERSION 12.14.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

4848
ENV YARN_VERSION 1.21.1
4949

5050
RUN 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

6771
COPY docker-entrypoint.sh /usr/local/bin/
6872
ENTRYPOINT ["docker-entrypoint.sh"]

12/stretch-slim/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ RUN groupadd --gid 1000 node \
55

66
ENV NODE_VERSION 12.14.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

4848
ENV YARN_VERSION 1.21.1
4949

5050
RUN 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

6771
COPY docker-entrypoint.sh /usr/local/bin/
6872
ENTRYPOINT ["docker-entrypoint.sh"]

13/buster-slim/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ RUN groupadd --gid 1000 node \
55

66
ENV NODE_VERSION 13.5.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

4848
ENV YARN_VERSION 1.21.1
4949

5050
RUN 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

6771
COPY docker-entrypoint.sh /usr/local/bin/
6872
ENTRYPOINT ["docker-entrypoint.sh"]

13/stretch-slim/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ RUN groupadd --gid 1000 node \
55

66
ENV NODE_VERSION 13.5.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

4848
ENV YARN_VERSION 1.21.1
4949

5050
RUN 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

6771
COPY docker-entrypoint.sh /usr/local/bin/
6872
ENTRYPOINT ["docker-entrypoint.sh"]

Dockerfile-slim.template

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ RUN groupadd --gid 1000 node \
55

66
ENV NODE_VERSION 0.0.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
"${NODE_KEYS[@]}"
@@ -32,12 +31,15 @@ RUN buildDeps='xz-utils' \
3231
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
3332
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
3433
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
35-
&& apt-get purge -y --auto-remove $buildDeps \
34+
&& apt-mark auto '.*' > /dev/null \
35+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
3636
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs
3737

3838
ENV YARN_VERSION 0.0.0
3939

4040
RUN set -ex \
41+
&& apt-get update && apt-get install -y ca-certificates curl wget gnupg dirmngr --no-install-recommends \
42+
&& rm -rf /var/lib/apt/lists/* \
4143
&& for key in \
4244
"${YARN_KEYS[@]}"
4345
; do \
@@ -52,7 +54,9 @@ RUN set -ex \
5254
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
5355
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
5456
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
55-
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz
57+
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
58+
&& apt-mark auto '.*' > /dev/null \
59+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
5660

5761
COPY docker-entrypoint.sh /usr/local/bin/
5862
ENTRYPOINT ["docker-entrypoint.sh"]

0 commit comments

Comments
 (0)