fix(build): use Debian Node image
This commit is contained in:
+8
-8
@@ -1,14 +1,14 @@
|
||||
FROM refinedev/node:22 AS base
|
||||
FROM node:22-bookworm-slim AS base
|
||||
|
||||
WORKDIR /app/refine
|
||||
|
||||
FROM base AS deps
|
||||
|
||||
RUN apk add --no-cache libc6-compat
|
||||
|
||||
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* .npmrc* ./
|
||||
|
||||
RUN \
|
||||
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
|
||||
elif [ -f package-lock.json ]; then npm ci --no-audit --no-fund; \
|
||||
elif [ -f package-lock.json ]; then npm ci; \
|
||||
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
|
||||
else echo "Lockfile not found." && exit 1; \
|
||||
fi
|
||||
@@ -40,12 +40,12 @@ ENV NODE_ENV=production
|
||||
COPY --from=builder /app/refine/public ./public
|
||||
|
||||
RUN mkdir .next
|
||||
RUN chown refine:nodejs .next
|
||||
RUN chown node:node .next
|
||||
|
||||
COPY --from=builder --chown=refine:nodejs /app/refine/.next/standalone ./
|
||||
COPY --from=builder --chown=refine:nodejs /app/refine/.next/static ./.next/static
|
||||
COPY --from=builder --chown=node:node /app/refine/.next/standalone ./
|
||||
COPY --from=builder --chown=node:node /app/refine/.next/static ./.next/static
|
||||
|
||||
USER refine
|
||||
USER node
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user