Skip to content

Commit

Permalink
Docker upgrade node version && remove node_modules after build
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Nov 10, 2024
1 parent f735364 commit bd7b098
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion starsky/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# Stage 1 Front-end
# # docker buildx imagetools inspect node:18-alpine
FROM --platform=$BUILDPLATFORM node:18-alpine AS react-build
FROM --platform=$BUILDPLATFORM node:20-alpine AS react-build
ARG TARGETPLATFORM
ARG BUILDPLATFORM

Expand All @@ -27,6 +27,7 @@ RUN for i in 1 2 3; do \
npm ci --legacy-peer-deps --prefer-offline --no-audit --no-fund --ignore-scripts && break || sleep 15; \
done && \
npm run build && \
rm -rf node_modules && \
echo "react done"

# no alpine build since there is no support for multi-arch
Expand Down

0 comments on commit bd7b098

Please sign in to comment.