forked from genlayerlabs/unhardcoded
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.antseed
More file actions
22 lines (18 loc) · 1.11 KB
/
Copy pathDockerfile.antseed
File metadata and controls
22 lines (18 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# AntSeed buyer sidecar — vendored, not `npm install`-at-runtime.
# Pinning the CLI in the image makes cold starts independent of the npm
# registry and freezes the bundled @antseed/node (whose DHT bootstrap nodes
# rot with the version). socat exposes the localhost-only buyer proxy on the
# container network. See antseed/entrypoint.sh for the why of each piece.
FROM node:25-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends socat \
&& rm -rf /var/lib/apt/lists/*
# Pinned, vendored. Bump deliberately (newer CLIs carry fresher bootstrap nodes).
# `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.
RUN npm install -g @antseed/cli@0.1.128 pg@8.16.3
ENV NODE_PATH=/usr/local/lib/node_modules
COPY antseed/db.js antseed/store.js antseed/write-market.js antseed/write-status.js antseed/control.js antseed/reclaim.mjs antseed/entrypoint.sh /usr/local/lib/antseed/
RUN chmod +x /usr/local/lib/antseed/entrypoint.sh
ENV ANTSEED_DATA_DIR=/data
ENTRYPOINT ["/usr/local/lib/antseed/entrypoint.sh"]