tosanoob commited on
Commit
e86e230
1 Parent(s): 8024bba

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -6
Dockerfile CHANGED
@@ -1,13 +1,19 @@
1
  FROM python:3.11
2
 
3
- # set work directory
4
- WORKDIR /code
5
 
6
- # copy project
7
- COPY . /code/
8
 
9
- RUN python -m venv ./arxiv_venv
10
- RUN bash ./arxiv_venv/bin/activate
 
 
 
 
 
 
 
11
 
12
  # install dependencies
13
  RUN pip install -r requirement.txt
 
1
  FROM python:3.11
2
 
3
+ # create new user id 1000
4
+ RUN useradd -m -u 1000 user
5
 
6
+ USER user
 
7
 
8
+ # Set home to the user's home directory
9
+ ENV HOME=/home/user \
10
+ PATH=/home/user/.local/bin:$PATH
11
+
12
+ # Set the working directory to the user's home directory
13
+ WORKDIR $HOME/app
14
+
15
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
16
+ COPY --chown=user . $HOME/app
17
 
18
  # install dependencies
19
  RUN pip install -r requirement.txt