hansaka1 commited on
Commit
52f5007
·
verified ·
1 Parent(s): 4ad6886

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -8
Dockerfile CHANGED
@@ -4,17 +4,16 @@ FROM node:18-slim
4
  # Install git to clone the repository
5
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6
 
7
- # Set the user to a non-root user for security (Hugging Face requirement)
8
- RUN useradd -m -u 1000 user
9
- USER user
10
- ENV HOME=/home/user \
11
- PATH=/home/user/.local/bin:$PATH
12
 
13
- WORKDIR $HOME/app
 
 
 
14
 
15
  # The user requested to clone the repo inside the container
16
- # We clone into a temporary directory and move contents to the app directory
17
- # to avoid issues with non-empty directory or git metadata.
18
  RUN git clone https://github.com/AlexaInc/wordlesolver.git .
19
 
20
  # Install dependencies
 
4
  # Install git to clone the repository
5
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6
 
7
+ # Set the working directory and permissions
8
+ WORKDIR /home/node/app
9
+ RUN chown -R node:node /home/node/app
 
 
10
 
11
+ # Use the existing 'node' user (UID 1000)
12
+ USER node
13
+ ENV HOME=/home/node \
14
+ PATH=/home/node/.local/bin:$PATH
15
 
16
  # The user requested to clone the repo inside the container
 
 
17
  RUN git clone https://github.com/AlexaInc/wordlesolver.git .
18
 
19
  # Install dependencies