bradduy commited on
Commit
ebf51e8
·
1 Parent(s): 142a57f

update dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -0
Dockerfile CHANGED
@@ -4,6 +4,15 @@ FROM node:20
4
  # Set the working directory in the container
5
  WORKDIR /app
6
 
 
 
 
 
 
 
 
 
 
7
  # Copy the package.json and package-lock.json (or yarn.lock) to install dependencies
8
  COPY package*.json ./
9
 
 
4
  # Set the working directory in the container
5
  WORKDIR /app
6
 
7
+ RUN useradd -m -u 1000 user
8
+ USER user
9
+ ENV HOME=/home/user \
10
+ PATH=/home/user/.local/bin:$PATH
11
+
12
+ WORKDIR $HOME/app
13
+
14
+ COPY --chown=user . $HOME/app
15
+
16
  # Copy the package.json and package-lock.json (or yarn.lock) to install dependencies
17
  COPY package*.json ./
18