File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,11 @@ RUN chown node "/usr/local/src/reaction-app"
64
64
RUN chown node "/usr/local/src/reaction-app/node_modules"
65
65
RUN chown node "/usr/local/src/reaction-app/package/node_modules"
66
66
67
- WORKDIR $APP_SOURCE_DIR/..
68
- COPY --chown=node package.json yarn.lock $APP_SOURCE_DIR/../
67
+ WORKDIR $APP_SOURCE_DIR
68
+
69
+ # Note that the two node_modules directories will not be copied during
70
+ # this due to being listed in the `.dockerignore` file.
71
+ COPY --chown=node . $APP_SOURCE_DIR
69
72
70
73
# Build the dependencies into the Docker image in a cacheable way. Dependencies
71
74
# are only rebuilt when package.json or yarn.lock is modified.
@@ -92,8 +95,7 @@ RUN set -ex; \
92
95
--frozen-lockfile \
93
96
--ignore-scripts \
94
97
--no-cache; \
95
- fi; \
96
- rm package.json yarn.lock
98
+ fi;
97
99
98
100
# For development, we will yarn install on each container start.
99
101
# This ensures that we use our Docker development .yarnrc config
@@ -107,9 +109,6 @@ RUN set -ex; \
107
109
# we already ran yarn install above, it doesn't matter.
108
110
COPY --chown=node ./.reaction/yarnrc-docker.template /home/node/.yarnrc
109
111
110
- WORKDIR $APP_SOURCE_DIR
111
- COPY --chown=node . $APP_SOURCE_DIR
112
-
113
112
# Important: Make sure we're the "node" user before we begin doing things because
114
113
# our tools use "/home/node" as the HOME dir.
115
114
USER node
You can’t perform that action at this time.
0 commit comments