forked from lucasponce/iter8-analytics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (20 loc) · 680 Bytes
/
Dockerfile
File metadata and controls
27 lines (20 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM python:3.9-slim AS builder
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential gcc
RUN python -m venv /opt/venv
# Make sure we use the virtualenv:
ENV PATH="/opt/venv/bin:$PATH"
RUN mkdir /iter8-analytics
WORKDIR /iter8-analytics
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY setup.py .
COPY iter8_analytics/ ./iter8_analytics/
RUN pip install -e .
FROM python:3.9-slim AS build-image
COPY --from=builder /opt/venv /opt/venv
COPY --from=builder /iter8-analytics /iter8-analytics
WORKDIR /iter8-analytics/iter8_analytics
# Make sure we use the virtualenv:
ENV PATH="/opt/venv/bin:$PATH"
CMD ["python", "fastapi_app.py"]