mirror of
https://git.wownero.com/asymptotically/docker-monero.git
synced 2024-08-15 01:03:28 +00:00
56 lines
1.4 KiB
Docker
56 lines
1.4 KiB
Docker
|
ARG WOWNERO_VERSION=0.8.0.1
|
|||
|
|
|||
|
FROM alpine:3.12 AS builder
|
|||
|
|
|||
|
ARG WOWNERO_VERSION
|
|||
|
|
|||
|
RUN apk add --no-cache \
|
|||
|
boost-dev \
|
|||
|
build-base \
|
|||
|
cmake \
|
|||
|
libexecinfo-dev \
|
|||
|
libsodium-dev \
|
|||
|
openpgm-dev \
|
|||
|
openssl-dev \
|
|||
|
pkgconfig \
|
|||
|
unbound-dev \
|
|||
|
zeromq-dev
|
|||
|
|
|||
|
# Extract Wownero source. Mirrored because GitHub tarballs do not include
|
|||
|
# submodules.
|
|||
|
WORKDIR /workdir
|
|||
|
ADD https://distfiles.offtopica.uk/wownero-${WOWNERO_VERSION}.tar.xz \
|
|||
|
wownero-${WOWNERO_VERSION}.tar.xz
|
|||
|
RUN tar xf wownero-${WOWNERO_VERSION}.tar.xz
|
|||
|
|
|||
|
WORKDIR wownero-${WOWNERO_VERSION}
|
|||
|
RUN cmake \
|
|||
|
-Bbuild \
|
|||
|
-DBUILD_SHARED_LIBS=On \
|
|||
|
-DCMAKE_BUILD_TYPE=Release \
|
|||
|
-DMANUAL_SUBMODULES=On \
|
|||
|
-DCMAKE_CXX_FLAGS='-DELPP_FEATURE_CRASH_LOG' \
|
|||
|
&& make \
|
|||
|
-s \
|
|||
|
-Cbuild \
|
|||
|
-j$(nproc) \
|
|||
|
daemon \
|
|||
|
wallet_rpc_server
|
|||
|
|
|||
|
# Copy binaries and required libraries to sysroot folder.
|
|||
|
RUN mkdir -p /sysroot/bin /sysroot/lib /sysroot/usr/lib \
|
|||
|
&& cp -v /lib/ld-musl-x86_64.so.1 /sysroot/lib/ \
|
|||
|
&& ldd build/bin/* \
|
|||
|
| awk '/=>/ { print $3 }' \
|
|||
|
| sort -u \
|
|||
|
| xargs -I '{}' cp -v '{}' /sysroot/usr/lib/ \
|
|||
|
&& cp -v build/bin/* /sysroot/bin/
|
|||
|
|
|||
|
FROM scratch
|
|||
|
|
|||
|
LABEL maintainer="Matt Smith <matt@offtopica.uk>"
|
|||
|
|
|||
|
COPY --from=builder /sysroot/lib /lib
|
|||
|
COPY --from=builder /sysroot/usr/lib /usr/lib
|
|||
|
COPY --from=builder /sysroot/bin/ /bin
|