Update Dockerfile
Browse files- Dockerfile +9 -3
Dockerfile
CHANGED
@@ -1,11 +1,17 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
5 |
COPY ./requirements.txt /code/requirements.txt
|
6 |
|
7 |
-
|
|
|
|
|
8 |
|
9 |
COPY . .
|
10 |
|
11 |
-
|
|
|
|
|
|
|
|
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
|