Add Dockerfile
For local builds, for testing / debug, it could be useful to have a docker image. Let's introduce that here Change-Id: I5c8438b4d144faa0135933826c3eb55a722272b3 Signed-off-by: Arnaud M <arnaud.morin@gmail.com>
This commit is contained in:
parent
fdb42356b4
commit
688c4e5743
3
build-docker.sh
Executable file
3
build-docker.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo docker build -t openstack-mistral:latest -f tools/docker/Dockerfile .
|
39
tools/docker/Dockerfile
Normal file
39
tools/docker/Dockerfile
Normal file
@ -0,0 +1,39 @@
|
||||
#
|
||||
# Builder
|
||||
#
|
||||
|
||||
FROM debian:bookworm-slim AS builder
|
||||
LABEL maintainer="Arnaud Morin <arnaud.morin@gmail.com>"
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
python3 python3-venv python3-pip git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create venv
|
||||
WORKDIR /opt/openstack/
|
||||
RUN python3 -m venv mistral && \
|
||||
/opt/openstack/mistral/bin/pip install --upgrade pip setuptools
|
||||
|
||||
# Copy source code
|
||||
WORKDIR /src/mistral
|
||||
COPY . .
|
||||
|
||||
# Install mistral
|
||||
RUN /opt/openstack/mistral/bin/pip install -r requirements.txt && \
|
||||
/opt/openstack/mistral/bin/pip install .
|
||||
|
||||
#
|
||||
# Runner
|
||||
#
|
||||
FROM debian:bookworm-slim
|
||||
LABEL maintainer="Arnaud Morin <arnaud.morin@gmail.com>"
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
python3 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /opt/openstack/mistral /opt/openstack/mistral
|
||||
|
||||
RUN ln -s /opt/openstack/mistral/bin/mistral-server /usr/local/bin/
|
||||
|
||||
USER root
|
Loading…
x
Reference in New Issue
Block a user