qmd/test/Containerfile
Tobi Lutke c7e8ea02a5
test: restructure container smoke tests for interactive use
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.
2026-02-22 11:09:36 -04:00

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"]