From 225f2318babea9661e8f7d1ab602cfc465b509d9 Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Fri, 25 Aug 2017 11:02:07 -0700 Subject: [PATCH] Remove an unnecessary directory from sqlite3 that took 30MB node.dtps was big and useless. See https://github.com/mapbox/node-sqlite3/issues/861 Change-Type: patch Signed-off-by: Pablo Carranza Velez --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 03191d4b..a3931f7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -154,6 +154,7 @@ RUN cp -R node_modules node_modules_prod \ && mv node_modules_prod node_modules # Remove various uneeded filetypes in order to reduce space +# We also remove the spurious node.dtps, see https://github.com/mapbox/node-sqlite3/issues/861 RUN find . -path '*/coverage/*' -o -path '*/test/*' -o -path '*/.nyc_output/*' \ -o -name '*.tar.*' -o -name '*.in' -o -name '*.cc' \ -o -name '*.c' -o -name '*.coffee' -o -name '*.eslintrc' \ @@ -162,7 +163,8 @@ RUN find . -path '*/coverage/*' -o -path '*/test/*' -o -path '*/.nyc_output/*' \ -o -name '*.yml' \ -delete \ && find . -type f -path '*/node_modules/sqlite3/deps*' -delete \ - && find . -type f -path '*/node_modules/knex/build*' -delete + && find . -type f -path '*/node_modules/knex/build*' -delete \ + && rm -rf node_modules/sqlite3/node.dtps # Create /var/run/resin for the gosuper to place its socket in RUN mkdir -p rootfs-overlay/var/run/resin