From da0c10fa99583b094d4313e46e51d05346b65a38 Mon Sep 17 00:00:00 2001 From: Koren Lev Date: Mon, 30 Jul 2018 20:21:32 +0300 Subject: [PATCH 1/5] Create suggested-fixes-branch --- suggested-fixes-branch | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 suggested-fixes-branch diff --git a/suggested-fixes-branch b/suggested-fixes-branch new file mode 100644 index 0000000..db4f84a --- /dev/null +++ b/suggested-fixes-branch @@ -0,0 +1,62 @@ +diff --git a/Dockerfile b/Dockerfile +index 3e7f1c4..8bad820 100644 +--- a/Dockerfile ++++ b/Dockerfile +@@ -46,6 +46,12 @@ ONBUILD ENV INSTALL_GRAPHICSMAGICK $INSTALL_GRAPHICSMAGICK + ONBUILD ARG TOOL_NODE_FLAGS + ONBUILD ENV TOOL_NODE_FLAGS $TOOL_NODE_FLAGS + ++# Add option to specify http and https proxies if needed during build ++ONBUILD ARG HTTP_PROXY ++ONBUILD ARG HTTPS_PROXY ++ONBUILD ENV HTTP_PROXY $HTTP_PROXY ++ONBUILD ENV HTTPS_PROXY $HTTPS_PROXY ++ + # optionally custom apt dependencies at app build time + ONBUILD RUN if [ "$APT_GET_INSTALL" ]; then apt-get update && apt-get install -y $APT_GET_INSTALL; fi + +diff --git a/dev.dockerfile b/dev.dockerfile +index 8911919..c5287d0 100644 +--- a/dev.dockerfile ++++ b/dev.dockerfile +@@ -45,6 +45,12 @@ ONBUILD ENV INSTALL_PHANTOMJS ${INSTALL_PHANTOMJS:-true} + ONBUILD ARG INSTALL_GRAPHICSMAGICK + ONBUILD ENV INSTALL_GRAPHICSMAGICK ${INSTALL_GRAPHICSMAGICK:-true} + ++# Add option to specify http and https proxies if needed during build ++ONBUILD ARG HTTP_PROXY ++ONBUILD ARG HTTPS_PROXY ++ONBUILD ENV HTTP_PROXY $HTTP_PROXY ++ONBUILD ENV HTTPS_PROXY $HTTPS_PROXY ++ + # optionally custom apt dependencies at app build time + ONBUILD RUN if [ "$APT_GET_INSTALL" ]; then apt-get update && apt-get install -y $APT_GET_INSTALL; fi + +diff --git a/scripts/build-meteor.sh b/scripts/build-meteor.sh +index 5f35df4..fdcc48d 100755 +--- a/scripts/build-meteor.sh ++++ b/scripts/build-meteor.sh +@@ -21,6 +21,11 @@ cd $APP_SOURCE_DIR + printf "\n[-] Running npm install in app directory...\n\n" + meteor npm install + ++# Removing buggy minifier package, to make build faster, more stable, low impact on final size ++# https://github.com/meteor/meteor/issues/5329 ++printf "\n[-] Removing buggy minifier...\n\n" ++meteor remove standard-minifier-js ++ + # build the bundle + printf "\n[-] Building Meteor application...\n\n" + mkdir -p $APP_BUNDLE_DIR +@@ -31,6 +36,12 @@ printf "\n[-] Running npm install in the server bundle...\n\n" + cd $APP_BUNDLE_DIR/bundle/programs/server/ + meteor npm install --production + ++# fix fibers bug ++# https://github.com/jshimko/meteor-launchpad/issues/92 ++printf "\n[-] Fixing Fibers PATH bug in node>8.x...\n\n" ++cd $APP_BUNDLE_DIR/bundle/programs/server/ ++npm remove fibers && npm install fibers ++ + # put the entrypoint script in WORKDIR + mv $BUILD_SCRIPTS_DIR/entrypoint.sh $APP_BUNDLE_DIR/bundle/entrypoint.sh From 46a20702f9bca88e89224b9fdf8466648b9de5b7 Mon Sep 17 00:00:00 2001 From: Koren Lev Date: Tue, 31 Jul 2018 15:19:02 +0300 Subject: [PATCH 2/5] adds ENV and ARG for building with http_proxy configuration --- Dockerfile | 6 ++++++ dev.dockerfile | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Dockerfile b/Dockerfile index 3e7f1c4..8bad820 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,6 +46,12 @@ ONBUILD ENV INSTALL_GRAPHICSMAGICK $INSTALL_GRAPHICSMAGICK ONBUILD ARG TOOL_NODE_FLAGS ONBUILD ENV TOOL_NODE_FLAGS $TOOL_NODE_FLAGS +# Add option to specify http and https proxies if needed during build +ONBUILD ARG HTTP_PROXY +ONBUILD ARG HTTPS_PROXY +ONBUILD ENV HTTP_PROXY $HTTP_PROXY +ONBUILD ENV HTTPS_PROXY $HTTPS_PROXY + # optionally custom apt dependencies at app build time ONBUILD RUN if [ "$APT_GET_INSTALL" ]; then apt-get update && apt-get install -y $APT_GET_INSTALL; fi diff --git a/dev.dockerfile b/dev.dockerfile index 8911919..c5287d0 100644 --- a/dev.dockerfile +++ b/dev.dockerfile @@ -45,6 +45,12 @@ ONBUILD ENV INSTALL_PHANTOMJS ${INSTALL_PHANTOMJS:-true} ONBUILD ARG INSTALL_GRAPHICSMAGICK ONBUILD ENV INSTALL_GRAPHICSMAGICK ${INSTALL_GRAPHICSMAGICK:-true} +# Add option to specify http and https proxies if needed during build +ONBUILD ARG HTTP_PROXY +ONBUILD ARG HTTPS_PROXY +ONBUILD ENV HTTP_PROXY $HTTP_PROXY +ONBUILD ENV HTTPS_PROXY $HTTPS_PROXY + # optionally custom apt dependencies at app build time ONBUILD RUN if [ "$APT_GET_INSTALL" ]; then apt-get update && apt-get install -y $APT_GET_INSTALL; fi From ffdd96fadd182b269d34cd5b52f7616bcd6f9e02 Mon Sep 17 00:00:00 2001 From: Koren Lev Date: Tue, 31 Jul 2018 15:21:07 +0300 Subject: [PATCH 3/5] remove buggy minifier, see: https://github.com/meteor/meteor/issues/5329 --- scripts/build-meteor.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/build-meteor.sh b/scripts/build-meteor.sh index 5f35df4..a5442b2 100755 --- a/scripts/build-meteor.sh +++ b/scripts/build-meteor.sh @@ -21,6 +21,11 @@ cd $APP_SOURCE_DIR printf "\n[-] Running npm install in app directory...\n\n" meteor npm install +# Removing buggy minifier package, to make build faster, more stable, low impact on final size +# see: https://github.com/meteor/meteor/issues/5329 +printf "\n[-] Removing buggy minifier...\n\n" +meteor remove standard-minifier-js + # build the bundle printf "\n[-] Building Meteor application...\n\n" mkdir -p $APP_BUNDLE_DIR From b5964a40817e6e803b769e8e820b3dc39227e8b1 Mon Sep 17 00:00:00 2001 From: Koren Lev Date: Tue, 31 Jul 2018 15:23:43 +0300 Subject: [PATCH 4/5] fix fibers bug - error in PATH bug hitting node>8.x, see: https://github.com/jshimko/meteor-launchpad/issues/92 --- scripts/build-meteor.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/build-meteor.sh b/scripts/build-meteor.sh index a5442b2..0dc48ff 100755 --- a/scripts/build-meteor.sh +++ b/scripts/build-meteor.sh @@ -36,6 +36,12 @@ printf "\n[-] Running npm install in the server bundle...\n\n" cd $APP_BUNDLE_DIR/bundle/programs/server/ meteor npm install --production +# fix fibers bug - error in PATH bug hitting node>8.x.. +# see: https://github.com/jshimko/meteor-launchpad/issues/92 +printf "\n[-] Fixing Fibers PATH bug in node>8.x...\n\n" +cd $APP_BUNDLE_DIR/bundle/programs/server/ +npm remove fibers && npm install fibers + # put the entrypoint script in WORKDIR mv $BUILD_SCRIPTS_DIR/entrypoint.sh $APP_BUNDLE_DIR/bundle/entrypoint.sh From 4bf7f5af2d5369e87bba977cdd547c2110774ee7 Mon Sep 17 00:00:00 2001 From: Koren Lev Date: Tue, 31 Jul 2018 15:27:09 +0300 Subject: [PATCH 5/5] remove redundent txt file --- suggested-fixes-branch | 62 ------------------------------------------ 1 file changed, 62 deletions(-) delete mode 100644 suggested-fixes-branch diff --git a/suggested-fixes-branch b/suggested-fixes-branch deleted file mode 100644 index db4f84a..0000000 --- a/suggested-fixes-branch +++ /dev/null @@ -1,62 +0,0 @@ -diff --git a/Dockerfile b/Dockerfile -index 3e7f1c4..8bad820 100644 ---- a/Dockerfile -+++ b/Dockerfile -@@ -46,6 +46,12 @@ ONBUILD ENV INSTALL_GRAPHICSMAGICK $INSTALL_GRAPHICSMAGICK - ONBUILD ARG TOOL_NODE_FLAGS - ONBUILD ENV TOOL_NODE_FLAGS $TOOL_NODE_FLAGS - -+# Add option to specify http and https proxies if needed during build -+ONBUILD ARG HTTP_PROXY -+ONBUILD ARG HTTPS_PROXY -+ONBUILD ENV HTTP_PROXY $HTTP_PROXY -+ONBUILD ENV HTTPS_PROXY $HTTPS_PROXY -+ - # optionally custom apt dependencies at app build time - ONBUILD RUN if [ "$APT_GET_INSTALL" ]; then apt-get update && apt-get install -y $APT_GET_INSTALL; fi - -diff --git a/dev.dockerfile b/dev.dockerfile -index 8911919..c5287d0 100644 ---- a/dev.dockerfile -+++ b/dev.dockerfile -@@ -45,6 +45,12 @@ ONBUILD ENV INSTALL_PHANTOMJS ${INSTALL_PHANTOMJS:-true} - ONBUILD ARG INSTALL_GRAPHICSMAGICK - ONBUILD ENV INSTALL_GRAPHICSMAGICK ${INSTALL_GRAPHICSMAGICK:-true} - -+# Add option to specify http and https proxies if needed during build -+ONBUILD ARG HTTP_PROXY -+ONBUILD ARG HTTPS_PROXY -+ONBUILD ENV HTTP_PROXY $HTTP_PROXY -+ONBUILD ENV HTTPS_PROXY $HTTPS_PROXY -+ - # optionally custom apt dependencies at app build time - ONBUILD RUN if [ "$APT_GET_INSTALL" ]; then apt-get update && apt-get install -y $APT_GET_INSTALL; fi - -diff --git a/scripts/build-meteor.sh b/scripts/build-meteor.sh -index 5f35df4..fdcc48d 100755 ---- a/scripts/build-meteor.sh -+++ b/scripts/build-meteor.sh -@@ -21,6 +21,11 @@ cd $APP_SOURCE_DIR - printf "\n[-] Running npm install in app directory...\n\n" - meteor npm install - -+# Removing buggy minifier package, to make build faster, more stable, low impact on final size -+# https://github.com/meteor/meteor/issues/5329 -+printf "\n[-] Removing buggy minifier...\n\n" -+meteor remove standard-minifier-js -+ - # build the bundle - printf "\n[-] Building Meteor application...\n\n" - mkdir -p $APP_BUNDLE_DIR -@@ -31,6 +36,12 @@ printf "\n[-] Running npm install in the server bundle...\n\n" - cd $APP_BUNDLE_DIR/bundle/programs/server/ - meteor npm install --production - -+# fix fibers bug -+# https://github.com/jshimko/meteor-launchpad/issues/92 -+printf "\n[-] Fixing Fibers PATH bug in node>8.x...\n\n" -+cd $APP_BUNDLE_DIR/bundle/programs/server/ -+npm remove fibers && npm install fibers -+ - # put the entrypoint script in WORKDIR - mv $BUILD_SCRIPTS_DIR/entrypoint.sh $APP_BUNDLE_DIR/bundle/entrypoint.sh