File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ ARG TARGETARCH
99
1010ENV LANG=C.UTF-8
1111ENV LC_ALL=C.UTF-8
12+ ENV NODE_ENV=production
13+ ENV NODE_PATH=/app/node_modules
14+
1215# Install only runtime dependencies
1316RUN apk update && apk add --no-cache \
1417 nodejs \
@@ -36,8 +39,8 @@ RUN echo "Building for platform: $TARGETPLATFORM" && \
3639 python3 \
3740 sqlite-dev \
3841 unzip && \
39- echo "Installing dependencies" && \
40- npm ci && \
42+ echo "Installing dependencies including dev dependencies " && \
43+ npm ci --include=dev && \
4144 echo "Building application" && \
4245 npm run build && \
4346 echo "Cleaning up build... " && \
@@ -53,7 +56,7 @@ RUN echo "Building for platform: $TARGETPLATFORM" && \
5356 sqlite-dev \
5457 unzip && \
5558 rm -rf /root/.npm /root/.node-gyp /root/.cache /tmp/* /var/tmp/* && \
56- rm -rf /app/src /app/package.json /app/package-lock.json /app/tsconfig.json \
59+ rm -rf /app/src /app/package.json /app/package-lock.json /app/tsconfig.json && \
5760 echo "Build completed successfully"
5861
5962# Create non-root user
You can’t perform that action at this time.
0 commit comments