Skip to content

Commit 625f899

Browse files
committed
minor image cleanup
Signed-off-by: Konstantin Demin <[email protected]>
1 parent f8184eb commit 625f899

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

Dockerfile-alpine.template

+6-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ RUN addgroup -g 1000 node \
5959
&& apk del .build-deps \
6060
# smoke tests
6161
&& node --version \
62-
&& npm --version
62+
&& npm --version \
63+
# cleanup
64+
&& rm -rf /root/.gnupg /root/.npm
6365

6466
ENV YARN_VERSION 0.0.0
6567

@@ -80,7 +82,9 @@ RUN apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
8082
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
8183
&& apk del .build-deps-yarn \
8284
# smoke test
83-
&& yarn --version
85+
&& yarn --version \
86+
# cleanup
87+
&& rm -rf /root/.gnupg /tmp/v8-compile-cache-*
8488

8589
COPY docker-entrypoint.sh /usr/local/bin/
8690
ENTRYPOINT ["docker-entrypoint.sh"]

Dockerfile-debian.template

+6-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
3232
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
3333
# smoke tests
3434
&& node --version \
35-
&& npm --version
35+
&& npm --version \
36+
# cleanup
37+
&& rm -rf /root/.gnupg /root/.npm
3638

3739
ENV YARN_VERSION 0.0.0
3840

@@ -52,7 +54,9 @@ RUN set -ex \
5254
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
5355
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
5456
# smoke test
55-
&& yarn --version
57+
&& yarn --version \
58+
# cleanup
59+
&& rm -rf /root/.gnupg /tmp/v8-compile-cache-*
5660

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

Dockerfile-slim.template

+6-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
4343
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
4444
# smoke tests
4545
&& node --version \
46-
&& npm --version
46+
&& npm --version \
47+
# cleanup
48+
&& rm -rf /root/.gnupg /root/.npm
4749

4850
ENV YARN_VERSION 0.0.0
4951

@@ -76,7 +78,9 @@ RUN set -ex \
7678
| xargs -r apt-mark manual \
7779
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
7880
# smoke test
79-
&& yarn --version
81+
&& yarn --version \
82+
# cleanup
83+
&& rm -rf /root/.gnupg /tmp/v8-compile-cache-*
8084

8185
COPY docker-entrypoint.sh /usr/local/bin/
8286
ENTRYPOINT ["docker-entrypoint.sh"]

0 commit comments

Comments
 (0)