deveix commited on
Commit
59371b3
·
1 Parent(s): e13455c

fix permissions

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -2
Dockerfile CHANGED
@@ -2,7 +2,7 @@
2
  FROM python:3.9-slim
3
 
4
  # Set up a working directory
5
- WORKDIR /code
6
 
7
 
8
  # Copy just the requirements into the working directory so it gets cached by itself
@@ -15,9 +15,17 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
15
  # RUN pip install typing-inspect==0.8.0 typing_extensions==4.5.
16
  # RUN pip install --force-reinstall typing-extensions==4.5
17
  # RUN pip install --force-reinstall openai==1.8
 
 
 
 
 
 
 
 
18
 
19
  # Copy the code into the working directory
20
- COPY ./app /code/app
21
 
22
  ENV PORT=8000
23
  EXPOSE 8000
 
2
  FROM python:3.9-slim
3
 
4
  # Set up a working directory
5
+ # WORKDIR /code
6
 
7
 
8
  # Copy just the requirements into the working directory so it gets cached by itself
 
15
  # RUN pip install typing-inspect==0.8.0 typing_extensions==4.5.
16
  # RUN pip install --force-reinstall typing-extensions==4.5
17
  # RUN pip install --force-reinstall openai==1.8
18
+ RUN useradd -m -u 1000 user
19
+ USER user
20
+ ENV HOME=/home/user \
21
+ PATH=/home/user/.local/bin:$PATH
22
+
23
+ WORKDIR $HOME/code
24
+
25
+ COPY --chown=user ./app $HOME/code/app
26
 
27
  # Copy the code into the working directory
28
+ # COPY ./app /code/app
29
 
30
  ENV PORT=8000
31
  EXPOSE 8000