fix(Dockerfile): switch discord-gateway to node:22-slim for opus compatibility
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM node:22-alpine
|
||||
FROM node:22-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -6,12 +6,14 @@ WORKDIR /app
|
||||
RUN npm install -g pnpm
|
||||
|
||||
# Create non-root user
|
||||
RUN addgroup -S app && adduser -S -G app app
|
||||
RUN groupadd --system app && useradd --system -g app app
|
||||
|
||||
# Install build tools for native dependencies (node-crc, @discordjs/opus)
|
||||
# and ffmpeg for voice transmit (PCM to OggOpus encoding)
|
||||
# This is done early to cache this expensive layer
|
||||
RUN apk add --no-cache python3 make g++ rust cargo ffmpeg linux-headers
|
||||
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
|
||||
python3 make g++ rustc cargo ffmpeg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Use bundled node headers for native addon compilation
|
||||
ENV npm_config_nodedir=/usr/local
|
||||
|
||||
Reference in New Issue
Block a user