mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
🐋 fix(Dockerfile): add back additional deps., handle permissions, use --no-audit
flag on install (#2157)
This commit is contained in:
parent
a673f62831
commit
09de9a2b42
1 changed files with 9 additions and 2 deletions
11
Dockerfile
11
Dockerfile
|
@ -1,16 +1,23 @@
|
||||||
# Base node image
|
# Base node image
|
||||||
FROM node:18-alpine AS node
|
FROM node:18-alpine AS node
|
||||||
|
|
||||||
COPY . /app
|
RUN mkdir -p /app && chown node:node /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
USER node
|
||||||
|
|
||||||
|
COPY --chown=node:node . .
|
||||||
|
|
||||||
# Allow mounting of these files, which have no default
|
# Allow mounting of these files, which have no default
|
||||||
# values.
|
# values.
|
||||||
RUN touch .env
|
RUN touch .env
|
||||||
RUN npm config set fetch-retry-maxtimeout 300000
|
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 && \
|
RUN apk --no-cache add curl && \
|
||||||
npm install
|
npm install --no-audit
|
||||||
|
|
||||||
# React client build
|
# React client build
|
||||||
ENV NODE_OPTIONS="--max-old-space-size=2048"
|
ENV NODE_OPTIONS="--max-old-space-size=2048"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue