Skip to content

Commit

Permalink
fix(docker): skip install when node_modules is present (#3429)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando authored Nov 17, 2023
1 parent c4f4ee6 commit 65fe9a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ docs
.coverage
pkg
test
node_modules
kubernetes
wallaby.js
docker
Expand Down
5 changes: 4 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn/releases .yarn/releases

ENV YARN_HTTP_TIMEOUT=300000
# set production env install will not install devDependencies
ENV NODE_ENV=production

RUN yarn install --immutable
# if node_modules does not exist, run it, otherwise skip
RUN test -d node_modules || yarn install --immutable

# Fix issue with serialport bindings #2349
RUN npm_config_build_from_source=true yarn rebuild @serialport/bindings-cpp
Expand Down

0 comments on commit 65fe9a4

Please sign in to comment.