Replaces the inner test script with an outer driver that runs individual podman/docker commands against a pre-built image. Tests sqlite-vec loading and store unit tests under both node and bun runtimes. Supports --build (image only), --shell (interactive), and -- CMD (arbitrary command) for debugging install issues in isolation.
30 lines
943 B
Docker
30 lines
943 B
Docker
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
curl ca-certificates bash git build-essential python3 libatomic1 && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install mise
|
|
ENV MISE_YES=1
|
|
RUN curl https://mise.run | sh
|
|
ENV PATH="/root/.local/bin:$PATH"
|
|
|
|
# Pre-install node and bun
|
|
RUN mise use -g node@latest bun@latest
|
|
|
|
# Copy the packed tarball and install via both package managers
|
|
COPY tobilu-qmd-*.tgz /tmp/
|
|
RUN mise exec node@latest -- npm install -g /tmp/tobilu-qmd-*.tgz
|
|
RUN mise exec bun@latest -- bun install -g /tmp/tobilu-qmd-*.tgz
|
|
|
|
# Copy test project (src + test + configs) and install deps
|
|
COPY test-src/ /opt/qmd/
|
|
RUN cd /opt/qmd && mise exec node@latest -- npm install 2>/dev/null
|
|
RUN cd /opt/qmd && mise exec bun@latest -- bun install 2>/dev/null || true
|
|
|
|
# Put everything on PATH
|
|
ENV PATH="/root/.bun/bin:/root/.local/share/mise/shims:/root/.local/bin:$PATH"
|
|
|
|
CMD ["bash"]
|