ZeroTraceX commited on
Commit
31313bf
·
verified ·
1 Parent(s): 6621cc7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -9
Dockerfile CHANGED
@@ -10,19 +10,20 @@ RUN apt-get update && apt-get install -y \
10
  # Create user and set up environment
11
  RUN useradd -m -u 1000 user
12
 
 
 
 
 
 
13
  # Clone the repository and set up directories
14
  RUN --mount=type=secret,id=Access_key,mode=0444,required=true \
15
- git clone $(cat /run/secrets/Access_key) /app && \
16
- mkdir -p /app/temp /app/uploads /app/files && \
17
- chown -R user:user /app && \
18
- chmod -R 755 /app && \
19
- chmod -R 777 /app/temp && \
20
- chmod -R 777 /app/uploads && \
21
- chmod -R 777 /app/files
22
 
23
  # Set working directory
24
- WORKDIR /app
25
-
 
 
26
  # Switch to user for pip installations
27
  USER user
28
  ENV PATH="/home/user/.local/bin:$PATH"
 
10
  # Create user and set up environment
11
  RUN useradd -m -u 1000 user
12
 
13
+ ENV HOME=/home/user \
14
+ PATH=/home/user/.local/bin:$PATH \
15
+ PORT=7860
16
+
17
+
18
  # Clone the repository and set up directories
19
  RUN --mount=type=secret,id=Access_key,mode=0444,required=true \
20
+ git clone $(cat /run/secrets/Access_key) $HOME/app
 
 
 
 
 
 
21
 
22
  # Set working directory
23
+ # Create and set working directory
24
+ WORKDIR $HOME/app
25
+ RUN mkdir -p uploads
26
+ RUN mkdir -p temp
27
  # Switch to user for pip installations
28
  USER user
29
  ENV PATH="/home/user/.local/bin:$PATH"