Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🐋 fix(Dockerfile): add back additional deps., handle permissions, use `--no-audit` flag on install (#2157)

Danny Avila09de9a2b42cd
diff --git a/Dockerfile b/Dockerfile
index c53f409193..a63791a68e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,16 +1,23 @@
# Base node image
FROM node:18-alpine AS node
-COPY . /app
+RUN mkdir -p /app && chown node:node /app
WORKDIR /app
+USER node
+
+COPY --chown=node:node . .
+
# Allow mounting of these files, which have no default
# values.
RUN touch .env
RUN npm config set fetch-retry-maxtimeout 300000
+RUN apk add g++ make py3-pip
+RUN npm install -g node-gyp
+
RUN apk --no-cache add curl && \
- npm install
+ npm install --no-audit
# React client build
ENV NODE_OPTIONS="--max-old-space-size=2048"