victor7246 commited on
Commit
6716adf
·
verified ·
1 Parent(s): a1894d1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -7
Dockerfile CHANGED
@@ -7,8 +7,6 @@ COPY ./packages.txt /app/packages.txt
7
 
8
  RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
9
 
10
- RUN useradd -m -u 1000 user
11
-
12
  # install FreeTDS and dependencies
13
  RUN apt-get update \
14
  && apt-get install unixodbc -y \
@@ -34,11 +32,18 @@ Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so" >> /etc/odbcinst.ini
34
 
35
  RUN pip3 install --no-cache-dir -r /app/requirements.txt
36
 
37
- WORKDIR /home/user/app
38
-
39
- COPY --chown=1000:1000 --from=root / /
40
-
41
- COPY --link --chown=1000 ./ /home/user/app
 
 
 
 
 
 
 
42
 
43
  EXPOSE 8501
44
  CMD streamlit run app.py \
 
7
 
8
  RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
9
 
 
 
10
  # install FreeTDS and dependencies
11
  RUN apt-get update \
12
  && apt-get install unixodbc -y \
 
32
 
33
  RUN pip3 install --no-cache-dir -r /app/requirements.txt
34
 
35
+ # User
36
+ RUN useradd -m -u 1000 user
37
+ USER user
38
+ ENV HOME /home/user
39
+ ENV PATH $HOME/.local/bin:$PATH
40
+ ENV PATH /root/.local/bin:$PATH
41
+ ENV PATH /home/.local/bin:$PATH
42
+
43
+ WORKDIR $HOME
44
+ RUN mkdir app
45
+ WORKDIR $HOME/app
46
+ COPY . $HOME/app
47
 
48
  EXPOSE 8501
49
  CMD streamlit run app.py \