第一次提交
Some checks failed
Build and Release / build-and-test (amd64, ubuntu) (push) Failing after 19m29s
Build and Release / build-and-test (amd64, alpine) (push) Failing after 19m31s
Build and Release / build-and-test (arm64, ubuntu) (push) Failing after 50m10s
Build and Release / release (push) Has been cancelled
Build and Release / build-and-test (arm64, alpine) (push) Has been cancelled
Some checks failed
Build and Release / build-and-test (amd64, ubuntu) (push) Failing after 19m29s
Build and Release / build-and-test (amd64, alpine) (push) Failing after 19m31s
Build and Release / build-and-test (arm64, ubuntu) (push) Failing after 50m10s
Build and Release / release (push) Has been cancelled
Build and Release / build-and-test (arm64, alpine) (push) Has been cancelled
This commit is contained in:
44
docker/Dockerfile.ubuntu
Normal file
44
docker/Dockerfile.ubuntu
Normal file
@@ -0,0 +1,44 @@
|
||||
FROM ubuntu:24.04 AS base
|
||||
|
||||
ARG TARGETARCH
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
cmake \
|
||||
gcc \
|
||||
g++ \
|
||||
make \
|
||||
libuv1-dev \
|
||||
libzmq3-dev \
|
||||
libcurl4-openssl-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
FROM base AS build
|
||||
|
||||
ARG P2POOL_VERSION
|
||||
ARG TARGETARCH
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
RUN git clone --recursive https://github.com/SChernykh/p2pool /src/p2pool
|
||||
|
||||
WORKDIR /src/p2pool
|
||||
|
||||
RUN git checkout ${P2POOL_VERSION}
|
||||
|
||||
# Determine parallel jobs based on cross-compilation
|
||||
RUN mkdir build && cd build && \
|
||||
if [ "$BUILDPLATFORM" != "$TARGETPLATFORM" ]; then \
|
||||
MAKE_JOBS="-j2"; \
|
||||
else \
|
||||
MAKE_JOBS="-j$(nproc)"; \
|
||||
fi && \
|
||||
echo "Building with parallel jobs: $MAKE_JOBS (cross-compile: $([ "$BUILDPLATFORM" != "$TARGETPLATFORM" ] && echo yes || echo no))" && \
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_MERGE_MINING_DONATION=OFF && \
|
||||
make $MAKE_JOBS
|
||||
|
||||
FROM scratch
|
||||
|
||||
ARG TARGETARCH
|
||||
|
||||
COPY --from=build /src/p2pool/build/p2pool /linux_${TARGETARCH}/p2pool
|
||||
Reference in New Issue
Block a user