3v324v23 commited on
Commit
07c8737
·
1 Parent(s): 2963d39

Fix Dockerfile: use existing 'node' user with UID 1000 instead of creating new one

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -4
Dockerfile CHANGED
@@ -39,10 +39,9 @@ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable
39
 
40
  EXPOSE 7860
41
 
42
- # Hugging Face Spaces non-root user (id 1000)
43
- RUN useradd -m -u 1000 user
44
- RUN chown -R user:user /app /client
45
- USER user
46
 
47
  # Run the server
48
  CMD ["node", "src/index.js"]
 
39
 
40
  EXPOSE 7860
41
 
42
+ # Hugging Face Spaces runs as UID 1000. The 'node' image already has a 'node' user with this ID.
43
+ RUN chown -R node:node /app /client
44
+ USER node
 
45
 
46
  # Run the server
47
  CMD ["node", "src/index.js"]