fix(Dockerfile): use node:22-slim for backend (glibc), add linux-headers + nodedir for gateway

This commit is contained in:
asepharyana
2026-07-02 02:22:09 +07:00
parent 13bba60e3a
commit 9e8f4377af
2 changed files with 7 additions and 5 deletions
+3 -4
View File
@@ -1,4 +1,4 @@
FROM node:22-alpine
FROM node:22-slim
WORKDIR /app
@@ -6,11 +6,10 @@ WORKDIR /app
RUN npm install -g pnpm
# Install build tools for native dependencies (node-crc, @discordjs/opus)
# @discordjs/voice is a shared workspace dependency needed even by backend
RUN apk add --no-cache python3 make g++
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends python3 make g++ wget && rm -rf /var/lib/apt/lists/*
# Create non-root user
RUN addgroup -S app && adduser -S -G app app
RUN groupadd --system app && useradd --system -g app app
# Copy dependency definition files first for better caching
COPY pnpm-workspace.yaml .