public-pool/Dockerfile
Arman The Parman d486c778a3
Docker changes (#29)
* Update README.md

I needed to change 
-v .env:.env 
to
-v .env:/.env
to get it to work.
Docker (Linux) was not happy otherwise.

* Update Dockerfile

Added cmake to Dockerfile, so Pi4 (ARM chip) will work.

* Update README.md

Corrected volume mount
2024-02-13 14:41:06 -05:00

39 lines
861 B
Docker

############################
# Docker build environment #
############################
FROM node:18.16.1-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 \
&& 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:18.16.1-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"]