sdutta28 commited on
Commit
88ca58f
1 Parent(s): 0874320

Dockerfile changes WORKDIR

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -11
Dockerfile CHANGED
@@ -1,28 +1,25 @@
1
- FROM python:3.9
2
 
3
  WORKDIR /code
4
 
5
  COPY ./requirements.txt requirements.txt
6
- COPY ./static static/
7
- COPY ./components components/
8
- COPY ./app.py app.py
9
-
10
- RUN ls -alt
11
 
12
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
13
 
14
- # Set up a new user named "user" with user ID 1000
15
  RUN useradd -m -u 1000 user
16
- # Switch to the "user" user
17
  USER user
18
  # Set home to the user's home directory
19
  ENV HOME=/home/user \
20
- PATH=/home/user/.local/bin:$PATH
 
21
 
22
- # Set the working directory to the user's home directory
23
  WORKDIR $HOME/app
24
 
25
- # Copy the current directory contents into the container at $HOME/app setting the owner to the user
 
 
 
26
  COPY --chown=user . $HOME/app
27
 
28
  CMD ["python", "app.py"]
 
1
+ FROM python:3.10
2
 
3
  WORKDIR /code
4
 
5
  COPY ./requirements.txt requirements.txt
 
 
 
 
 
6
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
 
9
  RUN useradd -m -u 1000 user
10
+
11
  USER user
12
  # Set home to the user's home directory
13
  ENV HOME=/home/user \
14
+ PATH=/home/user/.local/bin:$PATH\
15
+ NLTK_DATA=/home/user/app/static/nltk
16
 
 
17
  WORKDIR $HOME/app
18
 
19
+ RUN chmod -R 777
20
+ RUN pwd
21
+ RUN ls -alt
22
+
23
  COPY --chown=user . $HOME/app
24
 
25
  CMD ["python", "app.py"]