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

This reverts commit 9e8f4377af.
This commit is contained in:
asepharyana
2026-07-02 03:54:44 +07:00
parent 81f541c080
commit d37cecdb38
2 changed files with 5 additions and 7 deletions
+4 -3
View File
@@ -1,4 +1,4 @@
FROM node:22-slim FROM node:22-alpine
WORKDIR /app WORKDIR /app
@@ -6,10 +6,11 @@ WORKDIR /app
RUN npm install -g pnpm RUN npm install -g pnpm
# Install build tools for native dependencies (node-crc, @discordjs/opus) # Install build tools for native dependencies (node-crc, @discordjs/opus)
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends python3 make g++ wget && rm -rf /var/lib/apt/lists/* # @discordjs/voice is a shared workspace dependency needed even by backend
RUN apk add --no-cache python3 make g++
# Create non-root user # Create non-root user
RUN groupadd --system app && useradd --system -g app app RUN addgroup -S app && adduser -S -G app app
# Copy dependency definition files first for better caching # Copy dependency definition files first for better caching
COPY pnpm-workspace.yaml . COPY pnpm-workspace.yaml .
+1 -4
View File
@@ -11,10 +11,7 @@ RUN addgroup -S app && adduser -S -G app app
# Install build tools for native dependencies (node-crc, @discordjs/opus) # Install build tools for native dependencies (node-crc, @discordjs/opus)
# and ffmpeg for voice transmit (PCM to OggOpus encoding) # and ffmpeg for voice transmit (PCM to OggOpus encoding)
# This is done early to cache this expensive layer # This is done early to cache this expensive layer
RUN apk add --no-cache python3 make g++ rust cargo ffmpeg linux-headers RUN apk add --no-cache python3 make g++ rust cargo ffmpeg
# Use bundled node headers for native addon compilation
ENV npm_config_nodedir=/usr/local
# Copy dependency definition files first for better caching # Copy dependency definition files first for better caching
COPY pnpm-workspace.yaml . COPY pnpm-workspace.yaml .