fix(pool): update Dockerfile and config for Lethean testnet
- Dockerfile: node:8 → node:20, modern build chain - Config: ports 5555/7777/8888, Redis auth, testnet difficulty - Remove cryptonight-hashing dependency (ProgPoWZ via zano-node-util) Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
80878cd5f2
commit
62e1ec1082
1 changed files with 21 additions and 16 deletions
37
Dockerfile
37
Dockerfile
|
|
@ -1,23 +1,28 @@
|
|||
# Why node:8 and not node:10? Because (a) v8 is LTS, so more likely to be stable, and (b) "npm update" on node:10 breaks on Docker on Linux (but not on OSX, oddly)
|
||||
FROM node:8-slim
|
||||
FROM node:20-bookworm-slim AS builder
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs-legacy npm git libboost1.55-all libssl-dev \
|
||||
&& rm -rf /var/lib/apt/lists/* && \
|
||||
chmod +x /wait-for-it.sh
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
git python3 make g++ cmake libboost-all-dev libssl-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD . /pool/
|
||||
WORKDIR /pool/
|
||||
WORKDIR /pool
|
||||
|
||||
RUN npm update
|
||||
# Copy zano-node-util first (native dependency)
|
||||
COPY ../zano-node-util /zano-node-util
|
||||
|
||||
RUN mkdir -p /config
|
||||
# Copy pool source
|
||||
COPY package.json .
|
||||
RUN npm install --ignore-scripts
|
||||
|
||||
EXPOSE 8117
|
||||
EXPOSE 3333
|
||||
EXPOSE 5555
|
||||
EXPOSE 7777
|
||||
# Build native modules
|
||||
RUN cd node_modules/bignum && npx node-gyp rebuild || true
|
||||
|
||||
VOLUME ["/config"]
|
||||
COPY . .
|
||||
|
||||
CMD node init.js -config=/config/config.json
|
||||
FROM node:20-bookworm-slim
|
||||
WORKDIR /pool
|
||||
COPY --from=builder /pool /pool
|
||||
|
||||
EXPOSE 2117 5555 7777 8888
|
||||
|
||||
CMD ["node", "init.js"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue