Lolomat2000 commited on
Commit
e8c01ae
·
1 Parent(s): 44b8b99

permissions

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -3
Dockerfile CHANGED
@@ -4,12 +4,24 @@ RUN apt-get update
4
  RUN pip install --no-cache-dir --upgrade pip
5
  RUN apt-get install -y git
6
 
7
- COPY ./requirements-dev.txt /python-cors-proxy/requirements-dev.txt
8
- WORKDIR /python-cors-proxy
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  RUN pip install -r requirements-dev.txt
11
 
12
- COPY . /python-cors-proxy
13
 
14
  EXPOSE 7860
15
  CMD ["python", "manage.py", "runserver", "0.0.0.0:7860"]
 
4
  RUN pip install --no-cache-dir --upgrade pip
5
  RUN apt-get install -y git
6
 
7
+ # Set up a new user named "user" with user ID 1000
8
+ RUN useradd -m -u 1000 user
9
+
10
+ # Switch to the "user" user
11
+ USER user
12
+
13
+ # Set home to the user's home directory
14
+ ENV HOME=/home/user \
15
+ PATH=/home/user/.local/bin:$PATH
16
+
17
+ # Set the working directory to the user's home directory
18
+ WORKDIR $HOME/app
19
+
20
+ COPY ./requirements-dev.txt $HOME/app/requirements-dev.txt
21
 
22
  RUN pip install -r requirements-dev.txt
23
 
24
+ COPY . $HOME/app
25
 
26
  EXPOSE 7860
27
  CMD ["python", "manage.py", "runserver", "0.0.0.0:7860"]