Skip to content

Commit

Permalink
fix: prevent to do double install
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Nov 28, 2023
1 parent d1edffa commit 1d8ce1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ RUN \

COPY . .

# if node_modules does not exist, run it, otherwise skip
RUN [ -d 'node_modules' ] && echo "Skipping install" || npm install --omit=dev
# if node_modules does not exist, install deps, if dist is missing, install also dev deps
RUN [ -d 'node_modules' ] && echo "Skipping install" || npm install $([ -d 'dist'] && echo '--omit=dev' || echo '')

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

# Build back and frontend only when not existing
RUN [ -d 'dist' ] && echo "Skipping build" || npm install && npm run build
RUN [ -d 'dist' ] && echo "Skipping build" || npm run build

RUN npm prune --omit=dev && \
rm -rf \
Expand Down

0 comments on commit 1d8ce1a

Please sign in to comment.