DeFactOfficial commited on
Commit
1ea6780
1 Parent(s): 6299b08

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -13,16 +13,16 @@ LABEL maintainer="sam@defact.org" \
13
  usage="https://huggingface.co/spaces/DeFactOfficial/MMAPI"
14
 
15
  # Set up a new user named "user" with user ID 1000
16
- #RUN useradd -m -u 1027 root
17
 
18
  # Switch to the "user" user
19
- USER root
20
 
21
 
22
  # Set home to the user's home directory
23
- ENV HOME=/home/root \
24
- PATH=/home/root/.local/bin:$PATH \
25
- STATIC_SITE_root=$HOME/code/public
26
 
27
  # Install Node.js 20 (using n instead of nodesource for better HF compatibility)
28
  RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
@@ -43,7 +43,7 @@ WORKDIR $HOME/code
43
 
44
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
45
  ADD . $HOME/code
46
- COPY --chown=root . $HOME/code
47
 
48
  # INSTALL NPM PACKAGES
49
  # INSTALL FFMPEG TOOLING
 
13
  usage="https://huggingface.co/spaces/DeFactOfficial/MMAPI"
14
 
15
  # Set up a new user named "user" with user ID 1000
16
+ RUN useradd -o -u 1000 user
17
 
18
  # Switch to the "user" user
19
+ USER user
20
 
21
 
22
  # Set home to the user's home directory
23
+ ENV HOME=/home/user \
24
+ PATH=/home/user/.local/bin:$PATH \
25
+ STATIC_SITE_user=$HOME/code/public
26
 
27
  # Install Node.js 20 (using n instead of nodesource for better HF compatibility)
28
  RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
 
43
 
44
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
45
  ADD . $HOME/code
46
+ COPY --chown=user . $HOME/code
47
 
48
  # INSTALL NPM PACKAGES
49
  # INSTALL FFMPEG TOOLING