-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4317 from reactioncommerce/impactmass-fix-meteor-…
…npm-issue Fix NPM build issue in Docker build
- Loading branch information
Showing
2 changed files
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
############################################################################## | ||
# meteor-dev stage - builds image for dev and used with docker-compose.yml | ||
############################################################################## | ||
FROM reactioncommerce/base:v4.0.2 as meteor-dev | ||
FROM reactioncommerce/base:meteor-1.7.0.1 as meteor-dev | ||
|
||
LABEL maintainer="Reaction Commerce <[email protected]>" | ||
|
||
|
@@ -15,7 +15,11 @@ COPY --chown=node package.json $APP_SOURCE_DIR/ | |
# Without this NPM cannot write packages into node_modules later, when running in a container. | ||
RUN mkdir "$APP_SOURCE_DIR/node_modules" && chown node "$APP_SOURCE_DIR/node_modules" | ||
|
||
RUN meteor npm install | ||
# Due to an async race condition issue when installing packages with the NPM version (v5.10.0) | ||
# in Meteor 1.7, we are switching to using the NPM version installed in the base image (v5.6.0). | ||
# This prevents the "write after end" errors seen with this command. This will be reverted when | ||
# Meteor updates to an NPM version without this issue. | ||
RUN npm install | ||
|
||
COPY --chown=node . $APP_SOURCE_DIR | ||
|
||
|
@@ -32,7 +36,8 @@ RUN printf "\\n[-] Building Meteor application...\\n" \ | |
|
||
WORKDIR $APP_BUNDLE_DIR/bundle/programs/server/ | ||
|
||
RUN meteor npm install --production | ||
# TODO: Revert to Meteor NPM. See comment above about Meteor1.7 NPM version issue | ||
RUN npm install --production | ||
|
||
|
||
############################################################################## | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters