hunkim commited on
Commit
0763aa2
·
1 Parent(s): 7c844be

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -3
Dockerfile CHANGED
@@ -1,11 +1,17 @@
1
- FROM python:3.9
 
2
 
3
  WORKDIR /code
4
 
5
  COPY ./requirements.txt /code/requirements.txt
6
 
7
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
 
 
8
 
9
  COPY . .
10
 
11
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
1
+ # Base image
2
+ FROM docker.elastic.co/elasticsearch/elasticsearch:8.6.2
3
 
4
  WORKDIR /code
5
 
6
  COPY ./requirements.txt /code/requirements.txt
7
 
8
+ # Install Python and dependencies
9
+ RUN apt-get update && apt-get install -y python3 python3-pip
10
+ RUN pip3 install -r requirements.txt
11
 
12
  COPY . .
13
 
14
+ # Copy configuration files
15
+ COPY elasticsearch.yml /usr/share/elasticsearch/config/
16
+
17
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] && /usr/local/bin/docker-entrypoint.sh elasticsearch