- Coin: Zano → Lethean, ticker: ZAN/ZANO → LTHN - Ports: 11211 → 36941 (mainnet RPC), 46941 (testnet RPC) - Wallet: 11212 → 36944/46944 - Address prefix: iTHN - URLs: zano.org → lethean.io - Explorer links: explorer.lthn.io Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
53 lines
1.8 KiB
Docker
53 lines
1.8 KiB
Docker
# Build-only: compiles the C++ cryptonote native addon (lethean-util)
|
|
# Requires the Lethean blockchain source tree mounted/copied alongside.
|
|
#
|
|
# Build context must be the parent directory (zano-upstream/), e.g.:
|
|
# docker build -f zano-node-util/Dockerfile -t lethean-util .
|
|
#
|
|
# The blockchain repo is expected at ./blockchain (symlinked as Lethean inside the package).
|
|
|
|
FROM node:22 AS builder
|
|
|
|
# Native build dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
python3 \
|
|
python3-pip \
|
|
libboost-system-dev \
|
|
libboost-date-time-dev \
|
|
libboost-thread-dev \
|
|
libboost-serialization-dev \
|
|
libboost-iostreams-dev \
|
|
libboost-locale-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /workspace
|
|
|
|
# Copy blockchain source (provides Lethean/ headers referenced by binding.gyp)
|
|
COPY blockchain/ ./blockchain/
|
|
|
|
# Copy the generated currency config header into the build path that binding.gyp expects
|
|
RUN mkdir -p blockchain/build/release/src/config
|
|
COPY blockchain/build/release/src/config/currency_config.h \
|
|
blockchain/build/release/src/config/currency_config.h
|
|
|
|
# Copy the addon source
|
|
COPY zano-node-util/package.json zano-node-util/package-lock.json ./zano-node-util/
|
|
COPY zano-node-util/binding.gyp zano-node-util/main.cc zano-node-util/index.js ./zano-node-util/
|
|
|
|
# Symlink Lethean -> ../blockchain so binding.gyp paths resolve
|
|
RUN ln -sf /workspace/blockchain /workspace/zano-node-util/Lethean
|
|
|
|
WORKDIR /workspace/zano-node-util
|
|
|
|
RUN npm ci
|
|
RUN npm rebuild --build-from-source
|
|
|
|
# Minimal runtime image with the compiled .node addon
|
|
FROM node:22-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /workspace/zano-node-util/build ./build
|
|
COPY --from=builder /workspace/zano-node-util/index.js ./
|
|
COPY --from=builder /workspace/zano-node-util/package.json ./
|