mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-13 08:15:21 +02:00
fix: speed up multi arch build (#372)
* Speed up multi-arch Docker builds * Remove temporary Docker workflow branch trigger
This commit is contained in:
parent
93edef35e8
commit
fa2939e98f
4 changed files with 197 additions and 64 deletions
|
|
@ -1,3 +1,4 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
# Multi-stage build
|
||||
# Stage 1: Dependencies
|
||||
FROM node:20-alpine AS deps
|
||||
|
|
@ -11,8 +12,7 @@ RUN apk add --no-cache python3 make g++ libc6-compat
|
|||
COPY ui/package*.json ./
|
||||
|
||||
# Clean install with proper handling of native modules
|
||||
RUN rm -rf node_modules && \
|
||||
npm ci || npm install
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci
|
||||
|
||||
# Stage 2: Builder
|
||||
FROM node:20-alpine AS builder
|
||||
|
|
@ -71,4 +71,4 @@ USER nextjs
|
|||
EXPOSE 3010
|
||||
|
||||
# Start the production server using the standalone Node.js server
|
||||
CMD sh -c "echo '🚀 Application ready at http://localhost:3010' && PORT=3010 node server.js"
|
||||
CMD sh -c "echo '🚀 Application ready at http://localhost:3010' && PORT=3010 node server.js"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue