DrTech commited on
Commit
f96437c
1 Parent(s): 685b398

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -20
Dockerfile CHANGED
@@ -1,27 +1,25 @@
1
- FROM python:3.10
2
 
3
- WORKDIR /app
4
 
5
- COPY ./requirements.txt /app/requirements.txt
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
- RUN pip3 install --no-cache-dir -r /app/requirements.txt
 
 
 
 
10
 
11
- # User
12
- RUN useradd -m -u 1000 user
13
- USER user
14
- ENV HOME /home/user
15
- ENV PATH $HOME/.local/bin:$PATH
16
 
17
- WORKDIR $HOME
18
- RUN mkdir app
19
- WORKDIR $HOME/app
20
- COPY . $HOME/app
21
 
22
  EXPOSE 8501
23
- CMD streamlit run app3.py \
24
- --server.headless true \
25
- --server.enableCORS false \
26
- --server.enableXsrfProtection false \
27
- --server.fileWatcherType none
 
 
 
1
+ # app/Dockerfile
2
 
3
+ FROM python:3.10-slim
4
 
5
+ WORKDIR /app
 
6
 
7
+ RUN apt-get update && apt-get install -y \
8
+ build-essential \
9
+ curl \
10
+ software-properties-common \
11
+ git \
12
+ && rm -rf /var/lib/apt/lists/*
13
 
14
+ RUN git clone https://github.com/MSimsek07/ymgk_docker.git .
 
 
 
 
15
 
16
+ RUN pip3 install -r requirements.txt
 
 
 
17
 
18
  EXPOSE 8501
19
+
20
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
21
+
22
+
23
+ ENTRYPOINT ["streamlit", "run", "app3.py", "--server.port=8501", "--server.address=0.0.0.0"]
24
+
25
+ CMD streamlit run app3.py