mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
🐋 fix(Dockerfile): Create Necessary Directories at Build time (#2277)
When creating volumes for /app/client/public/images and /app/api/logs docker will inherit the permissions from the existing directores in the image. Since they are missing it defaults to root, and since librechat now uses the "node" user instead of "root" storing images, files and logs will fail. Fix by creating those directories in the docker image with the node user, so that if docker creates the volumes the permissions are inherited and the directories are owned by "node" and not "root".
This commit is contained in:
parent
93af814596
commit
30d084e696
1 changed files with 4 additions and 0 deletions
|
|
@ -26,6 +26,10 @@ RUN npm install --no-audit
|
|||
ENV NODE_OPTIONS="--max-old-space-size=2048"
|
||||
RUN npm run frontend
|
||||
|
||||
# Create directories for the volumes to inherit
|
||||
# the correct permissions
|
||||
RUN mkdir -p /app/client/public/images /app/api/logs
|
||||
|
||||
# Node API setup
|
||||
EXPOSE 3080
|
||||
ENV HOST=0.0.0.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue