Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ jobs:
-v "$PWD/scripts/check_sidecar_modules.js:/tmp/check.js:ro" \
--entrypoint node unhardcoded-antseed:ci /tmp/check.js

- name: AntSeed CLI resolves its package dependencies inside the image
run: docker run --rm --entrypoint antseed unhardcoded-antseed:ci --help >/dev/null

# --network host so the container reaches the runner's postgres service on
# localhost; a bridged container cannot. No `|| true` on the run: a
# container that fails to start must fail the job, not fall through to a
Expand Down
11 changes: 9 additions & 2 deletions Dockerfile.antseed
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ FROM node:22-slim AS antseed-dependencies
# releases undeployable; none of this toolchain is copied into the runtime.
RUN apt-get update \
&& apt-get install -y --no-install-recommends python3 make g++ \
&& npm install -g @antseed/cli@0.1.128 pg@8.16.3 \
&& for install_attempt in 1 2 3; do \
if npm install -g @antseed/cli@0.1.128 pg@8.16.3; then break; fi; \
rm -rf /usr/local/lib/node_modules/@antseed \
/usr/local/lib/node_modules/pg /usr/local/bin/antseed; \
if [ "${install_attempt}" = 3 ]; then exit 1; fi; \
done \
&& rm -rf /var/lib/apt/lists/*

FROM node:22-slim
Expand All @@ -23,7 +28,9 @@ RUN apt-get update \
# `pg` is the market writer's Postgres client (write-market.js upserts peer_offers
# into the shared host store). NODE_PATH lets the scripts require these globals.
COPY --from=antseed-dependencies /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=antseed-dependencies /usr/local/bin/antseed /usr/local/bin/antseed
# Docker COPY dereferences the npm-created bin symlink. Recreate it explicitly
# so Node resolves package imports from @antseed/cli instead of /usr/local/bin.
RUN ln -s ../lib/node_modules/@antseed/cli/dist/cli/index.js /usr/local/bin/antseed
ENV NODE_PATH=/usr/local/lib/node_modules

# Every non-test file under antseed/ — an explicit list silently ships a module
Expand Down
Loading