| 1 |
# |
| 2 |
# Builder |
| 3 |
# |
| 4 |
|
| 5 |
FROM debian:bookworm-slim AS builder |
| 6 |
LABEL maintainer="Arnaud Morin <[email protected]>" |
| 7 |
|
| 8 |
RUN apt-get update && apt-get install -y \ |
| 9 |
python3 python3-venv python3-pip git \ |
| 10 |
&& rm -rf /var/lib/apt/lists/* |
| 11 |
|
| 12 |
# Create venv |
| 13 |
WORKDIR /opt/openstack/ |
| 14 |
RUN python3 -m venv mistral && \ |
| 15 |
/opt/openstack/mistral/bin/pip install --upgrade pip setuptools |
| 16 |
|
| 17 |
# Copy source code |
| 18 |
WORKDIR /src/mistral |
| 19 |
COPY . . |
| 20 |
|
| 21 |
# Install mistral |
| 22 |
RUN /opt/openstack/mistral/bin/pip install -r requirements.txt && \ |
| 23 |
/opt/openstack/mistral/bin/pip install . |
| 24 |
|
| 25 |
# |
| 26 |
# Runner |
| 27 |
# |
| 28 |
FROM debian:bookworm-slim |
| 29 |
LABEL maintainer="Arnaud Morin <[email protected]>" |
| 30 |
|
| 31 |
RUN apt-get update && apt-get install -y \ |
| 32 |
python3 \ |
| 33 |
&& rm -rf /var/lib/apt/lists/* |
| 34 |
|
| 35 |
COPY --from=builder /opt/openstack/mistral /opt/openstack/mistral |
| 36 |
|
| 37 |
RUN ln -s /opt/openstack/mistral/bin/mistral-server /usr/local/bin/ |
| 38 |
|
| 39 |
USER root |