mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-02 07:40:48 +00:00
Merge pull request #313 from resin-io/dont-npm-install-twice
Avoid installing npm dependencies twice
This commit is contained in:
commit
a2df8c513a
@ -1,3 +1,4 @@
|
|||||||
|
* Avoid installing npm dependencies twice [Pablo]
|
||||||
* Updated to bluebird 3 [Page]
|
* Updated to bluebird 3 [Page]
|
||||||
* Better parameter handling in PUT /v1/devices/:uuid [Pablo]
|
* Better parameter handling in PUT /v1/devices/:uuid [Pablo]
|
||||||
* An update hook response of 200 will cause the proxyvisor to stop pinging the hook [Pablo]
|
* An update hook response of 200 will cause the proxyvisor to stop pinging the hook [Pablo]
|
||||||
|
@ -40,17 +40,17 @@ RUN set -x \
|
|||||||
|
|
||||||
COPY package.json /usr/src/app/
|
COPY package.json /usr/src/app/
|
||||||
|
|
||||||
# First install devDependencies too in order to run the build
|
# Install only the production modules
|
||||||
RUN JOBS=MAX npm install --unsafe-perm
|
RUN JOBS=MAX npm install --production --no-optional --unsafe-perm \
|
||||||
|
&& npm dedupe
|
||||||
|
|
||||||
COPY src /usr/src/app/src
|
COPY src /usr/src/app/src
|
||||||
|
|
||||||
RUN npm run lint \
|
# Install devDependencies, build the coffeescript and then prune the deps
|
||||||
&& npm run build
|
RUN npm install --only=dev --no-optional --unsafe-perm \
|
||||||
|
&& npm run lint \
|
||||||
# Re-install just production modules. This should be fast due to npm cache from previous layer
|
&& npm run build \
|
||||||
RUN rm -rf node_modules \
|
&& npm prune --production \
|
||||||
&& JOBS=MAX npm install --unsafe-perm --production --no-optional \
|
|
||||||
&& npm dedupe
|
&& npm dedupe
|
||||||
|
|
||||||
# Remove various uneeded filetypes in order to reduce space
|
# Remove various uneeded filetypes in order to reduce space
|
||||||
|
Loading…
x
Reference in New Issue
Block a user