From e327151501d626d386d94a372058e01397f6fb6d Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Tue, 26 Feb 2019 22:37:03 +0100 Subject: [PATCH] :hammer: Takes off a whopping 5 MEGABYTES from the add-on size --- thelounge/Dockerfile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/thelounge/Dockerfile b/thelounge/Dockerfile index 0c41efe..dc6296b 100644 --- a/thelounge/Dockerfile +++ b/thelounge/Dockerfile @@ -5,13 +5,25 @@ FROM ${BUILD_FROM} # Install packages # hadolint ignore=DL3003 RUN \ - apk add --no-cache \ - nodejs-current=9.11.1-r2 \ + apk add --no-cache --virtual .build-dependencies \ yarn=1.7.0-r0 \ \ - && yarn global add thelounge@3.0.1 \ + && apk add --no-cache \ + nodejs-current=9.11.1-r2 \ \ + && yarn global add \ + modclean \ + thelounge@3.0.1 \ + \ + && modclean \ + --path /usr/local/share/.config/yarn/global \ + --no-progress \ + --keep-empty \ + --run \ + \ + && yarn global remove modclean \ && yarn cache clean \ + && apk del --purge .build-dependencies \ && rm -fr /tmp/* # Copy root filesystem