ChandimaPrabath commited on
Commit
28a170f
·
1 Parent(s): af5d4c7

fix docker issue

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -1
Dockerfile CHANGED
@@ -17,7 +17,9 @@ RUN apt-get update && apt-get install -y \
17
  && echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get \
18
  && chmod +x /usr/bin/apt-get \
19
  && useradd -m -u 1000 user \
20
- && git lfs install
 
 
21
 
22
  # Set the working directory
23
  WORKDIR /home/user/app
@@ -29,6 +31,9 @@ RUN pip install --no-cache-dir -r /tmp/requirements.txt
29
  # Copy the application code
30
  COPY --chown=1000:1000 ./ /home/user/app
31
 
 
 
 
32
  # Expose the port the app runs on
33
  EXPOSE 7860
34
 
 
17
  && echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get \
18
  && chmod +x /usr/bin/apt-get \
19
  && useradd -m -u 1000 user \
20
+ && git lfs install \
21
+ # Set permissions for /tmp directory
22
+ && chmod 1777 /tmp
23
 
24
  # Set the working directory
25
  WORKDIR /home/user/app
 
31
  # Copy the application code
32
  COPY --chown=1000:1000 ./ /home/user/app
33
 
34
+ # Switch to the non-root user
35
+ USER user
36
+
37
  # Expose the port the app runs on
38
  EXPOSE 7860
39