From 53d8e021ae4dc2cb8cd948208d45609cbffa8831 Mon Sep 17 00:00:00 2001 From: Randall Stillwell Date: Tue, 10 Mar 2026 07:40:35 -0500 Subject: [PATCH] Fix Docker build: switch from Alpine to Debian slim Alpine's apk package manager fails in Coolify's build environment due to network permission issues. Debian slim's apt-get is more reliable in containerized CI/CD pipelines. Made-with: Cursor --- Dockerfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 305a6c9..4112e5a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,9 @@ -FROM node:18-alpine AS base +FROM node:18-slim AS base -RUN apk add --no-cache graphicsmagick ghostscript +RUN apt-get update && apt-get install -y --no-install-recommends \ + graphicsmagick \ + ghostscript \ + && rm -rf /var/lib/apt/lists/* FROM base AS deps WORKDIR /app @@ -21,8 +24,8 @@ WORKDIR /app ENV NODE_ENV=production ENV NEXT_TELEMETRY_DISABLED=1 -RUN addgroup --system --gid 1001 nodejs -RUN adduser --system --uid 1001 nextjs +RUN groupadd --system --gid 1001 nodejs +RUN useradd --system --uid 1001 nextjs COPY --from=builder /app/public ./public COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./