mirror of
https://github.com/luckjiawei/podux.git
synced 2026-12-02 07:56:50 +00:00
💚 fix docker build action
This commit is contained in:
1 parent
dceeddd0f4
commit
ea665e5da8
1 file changed
+5
-14
+5
-14
@@ -1,24 +1,15 @@
|
||||
# Multi-stage Dockerfile for frpc-hub
|
||||
# Stage 1: Build frontend
|
||||
FROM node:20-alpine AS frontend-builder
|
||||
# Stage 1: Build frontend (always on native amd64 to avoid QEMU OOM on arm builds)
|
||||
FROM --platform=linux/amd64 node:22-alpine AS frontend-builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy frontend source
|
||||
COPY site/package*.json site/pnpm-lock.yaml* ./
|
||||
# Install dependencies (try pnpm first, fallback to npm)
|
||||
RUN if [ -f pnpm-lock.yaml ]; then \
|
||||
npm install -g pnpm && pnpm install; \
|
||||
else \
|
||||
npm install; \
|
||||
fi
|
||||
COPY site/package*.json site/pnpm-lock.yaml ./
|
||||
RUN npm install -g pnpm@10 && pnpm install --frozen-lockfile
|
||||
|
||||
COPY site/ ./
|
||||
RUN if [ -f pnpm-lock.yaml ]; then \
|
||||
pnpm run build; \
|
||||
else \
|
||||
npm run build; \
|
||||
fi
|
||||
RUN pnpm run build
|
||||
|
||||
# Stage 2: Build backend
|
||||
FROM golang:1.25-alpine AS backend-builder
|
||||
|
||||
Reference in new issue
Block a user