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
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
🐋 ci: create smaller Docker images (#2691)
Christian Köberl5920672a8c31
diff --git a/Dockerfile b/Dockerfileindex f688efa7e9..6c70a6d7f2 100644--- a/Dockerfile+++ b/Dockerfile@@ -1,10 +1,8 @@# v0.7.2# Base node image-FROM node:18-alpine3.18 AS node+FROM node:20-alpine AS node-RUN apk add g++ make py3-pip-RUN npm install -g node-gypRUN apk --no-cache add curlRUN mkdir -p /app && chown node:node /app@@ -14,20 +12,20 @@ USER nodeCOPY --chown=node:node . .-# Allow mounting of these files, which have no default-# values.-RUN touch .env-RUN npm config set fetch-retry-maxtimeout 600000-RUN npm config set fetch-retries 5-RUN npm config set fetch-retry-mintimeout 15000-RUN npm install --no-audit+RUN \+ # Allow mounting of these files, which have no default+ touch .env ; \+ # Create directories for the volumes to inherit the correct permissions+ mkdir -p /app/client/public/images /app/api/logs ; \+ npm config set fetch-retry-maxtimeout 600000 ; \+ npm config set fetch-retries 5 ; \+ npm config set fetch-retry-mintimeout 15000 ; \+ npm install --no-audit; \+ # React client build+ NODE_OPTIONS="--max-old-space-size=2048" npm run frontend; \+ npm prune --production; \+ npm cache clean --force-# React client build-ENV NODE_OPTIONS="--max-old-space-size=2048"-RUN npm run frontend--# Create directories for the volumes to inherit-# the correct permissionsRUN mkdir -p /app/client/public/images /app/api/logs# Node API setupdiff --git a/Dockerfile.multi b/Dockerfile.multiindex a3bc0fed40..41e8825b81 100644--- a/Dockerfile.multi+++ b/Dockerfile.multi@@ -7,32 +7,31 @@ FROM node:20-alpine AS baseFROM base AS data-provider-buildWORKDIR /app/packages/data-providerCOPY ./packages/data-provider ./-RUN npm install+RUN npm install; npm cache clean --forceRUN npm run build+RUN npm prune --production# React client build-FROM data-provider-build AS client-build+FROM base AS client-buildWORKDIR /app/clientCOPY ./client/package*.json ./# Copy data-provider to client's node_modules-RUN mkdir -p /app/client/node_modules/librechat-data-provider/-RUN cp -R /app/packages/data-provider/* /app/client/node_modules/librechat-data-provider/-RUN npm install+COPY --from=data-provider-build /app/packages/data-provider/ /app/client/node_modules/librechat-data-provider/+RUN npm install; npm cache clean --forceCOPY ./client/ ./ENV NODE_OPTIONS="--max-old-space-size=2048"RUN npm run build# Node API setup-FROM data-provider-build AS api-build+FROM base AS api-buildWORKDIR /app/apiCOPY api/package*.json ./COPY api/ ./# Copy helper scriptsCOPY config/ ./# Copy data-provider to API's node_modules-RUN mkdir -p /app/api/node_modules/librechat-data-provider/-RUN cp -R /app/packages/data-provider/* /app/api/node_modules/librechat-data-provider/-RUN npm install+COPY --from=data-provider-build /app/packages/data-provider/ /app/api/node_modules/librechat-data-provider/+RUN npm install --include prod; npm cache clean --forceCOPY --from=client-build /app/client/dist /app/client/distEXPOSE 3080ENV HOST=0.0.0.0