The qmd bin was a custom bash script that discovered node via hardcoded fallback paths (mise, asdf, nvm, homebrew). This was nonstandard and caused ABI mismatches when installed via bun (native modules compiled for bun but executed with node). Now uses the standard npm bin convention: dist/qmd.js with a node shebang, added by the build script. The isMain guard resolves symlinks so it works when npm/bun create symlinked bin entries. Also converts all dynamic require() calls in tests to ESM imports, and adds container-based smoke tests (test/smoke-install.sh) that verify install + run under both node and bun via mise in a Debian container.
22 lines
551 B
Docker
22 lines
551 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 test script
|
|
COPY tobilu-qmd-*.tgz /tmp/
|
|
COPY smoke-install-test.sh /tmp/
|
|
RUN chmod +x /tmp/smoke-install-test.sh
|
|
|
|
CMD ["/tmp/smoke-install-test.sh"]
|