mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2025-03-17 21:31:42 +01:00
41 lines
902 B
Docker
41 lines
902 B
Docker
############################
|
|
# Docker build environment #
|
|
############################
|
|
|
|
FROM node:22.11.0-bookworm-slim AS build
|
|
|
|
# Upgrade all packages and install dependencies
|
|
RUN apt-get update \
|
|
&& apt-get upgrade -y
|
|
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
python3 \
|
|
build-essential \
|
|
cmake \
|
|
curl \
|
|
ca-certificates \
|
|
&& apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
|
|
WORKDIR /build
|
|
|
|
COPY . .
|
|
|
|
# Build Public Pool using NPM
|
|
RUN npm i && npm run build
|
|
|
|
############################
|
|
# Docker final environment #
|
|
############################
|
|
|
|
FROM node:22.11.0-bookworm-slim
|
|
|
|
# Expose ports for Stratum and Bitcoin RPC
|
|
EXPOSE 3333 3334 8332
|
|
|
|
WORKDIR /public-pool
|
|
|
|
# Copy built binaries into the final image
|
|
COPY --from=build /build .
|
|
#COPY .env.example .env
|
|
|
|
CMD ["/usr/local/bin/node", "dist/main"]
|