mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
Dockerfile improvements and automatic Github Actions builds (#14)
* Initial GA push * Fix Actions * Remove test runs * Update Trivy scanner to latest syntax * Remove unnecessary build stage * Switch to slim base images * Minor Dockerfile improvements * Fix slim builds * Fix slim builds round 2
This commit is contained in:
+15
-7
@@ -2,27 +2,35 @@
|
||||
# Docker build environment #
|
||||
############################
|
||||
|
||||
FROM node:18.16.1-bookworm AS build
|
||||
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 \
|
||||
&& apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm i
|
||||
RUN npm run build
|
||||
# Build Public Pool using NPM
|
||||
RUN npm i && npm run build
|
||||
|
||||
############################
|
||||
# Docker final environment #
|
||||
############################
|
||||
|
||||
FROM node:18.16.1-bookworm
|
||||
FROM node:18.16.1-bookworm-slim
|
||||
|
||||
EXPOSE 3333
|
||||
EXPOSE 3334
|
||||
EXPOSE 8332
|
||||
# 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user