From a45ccf1db7bc07b059b30ac378830e23c09eae40 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Wed, 6 Mar 2019 01:56:32 +0200 Subject: [Remove phantomjs binary from Docker/Snap/Stackerfile to reduce size](https://github.com/wekan/wekan/issues/2229). Thanks to soohwa ! Closes #2229 --- Dockerfile | 1 + snapcraft.yaml | 2 +- stacksmith/user-scripts/build.sh | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f4ed9757..7461797c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -293,6 +293,7 @@ RUN \ gosu wekan:wekan /home/wekan/.meteor/meteor npm install && \ gosu wekan:wekan /home/wekan/.meteor/meteor build --directory /home/wekan/app_build && \ cp /home/wekan/app/fix-download-unicode/cfs_access-point.txt /home/wekan/app_build/bundle/programs/server/packages/cfs_access-point.js && \ + rm /home/wekan/app_build/bundle/programs/server/npm/node_modules/meteor/rajit_bootstrap3-datepicker/lib/bootstrap-datepicker/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs && \ chown wekan:wekan /home/wekan/app_build/bundle/programs/server/packages/cfs_access-point.js && \ #Removed binary version of bcrypt because of security vulnerability that is not fixed yet. #https://github.com/wekan/wekan/commit/4b2010213907c61b0e0482ab55abb06f6a668eac diff --git a/snapcraft.yaml b/snapcraft.yaml index be6d0586..07c65e5a 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -206,7 +206,7 @@ parts: cp -r .build/bundle/* $SNAPCRAFT_PART_INSTALL/ cp .build/bundle/.node_version.txt $SNAPCRAFT_PART_INSTALL/ rm $SNAPCRAFT_PART_INSTALL/lib/node_modules/wekan - execstack --clear-execstack $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/rajit_bootstrap3-datepicker/lib/bootstrap-datepicker/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs + rm $SNAPCRAFT_PART_INSTALL/programs/server/npm/node_modules/meteor/rajit_bootstrap3-datepicker/lib/bootstrap-datepicker/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs organize: README: README.wekan prime: diff --git a/stacksmith/user-scripts/build.sh b/stacksmith/user-scripts/build.sh index 2c55d4f0..86283202 100755 --- a/stacksmith/user-scripts/build.sh +++ b/stacksmith/user-scripts/build.sh @@ -92,6 +92,7 @@ sudo -u wekan ${meteor} npm install sudo -u wekan ${meteor} build --directory /home/wekan/app_build sudo cp /home/wekan/app/fix-download-unicode/cfs_access-point.txt /home/wekan/app_build/bundle/programs/server/packages/cfs_access-point.js sudo chown wekan:wekan /home/wekan/app_build/bundle/programs/server/packages/cfs_access-point.js +sudo rm /home/wekan/app_build/bundle/programs/server/npm/node_modules/meteor/rajit_bootstrap3-datepicker/lib/bootstrap-datepicker/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs cd /home/wekan/app_build/bundle/programs/server/ sudo npm install sudo chown -R wekan:wekan ./node_modules -- cgit v1.2.3-1-g7c22