From 3f38a91960f9ebe4a4c9a32996ba9c3c310846f5 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Mon, 1 May 2023 15:53:00 -0700 Subject: [PATCH] make image smaller --- dockerfiles/wownerod_compile_simple | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/dockerfiles/wownerod_compile_simple b/dockerfiles/wownerod_compile_simple index 57732ad..c27222e 100644 --- a/dockerfiles/wownerod_compile_simple +++ b/dockerfiles/wownerod_compile_simple @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 as og +FROM ubuntu:22.04 as builder ENV DEBIAN_FRONTEND noninteractive @@ -12,4 +12,28 @@ RUN git clone https://git.wownero.com/wownero/wownero --depth=1 --branch=v0.11.0 RUN make -j4 -RUN cp /opt/wownero/build/Linux/_no_branch_/release/bin/* /bin/ \ No newline at end of file +RUN cp /opt/wownero/build/Linux/_no_branch_/release/bin/* /bin/ + +FROM ubuntu:22.04 as main + +WORKDIR /data + +# Copy static executables and libs from initial container +COPY --from=builder /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.74.0 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.74.0 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.74.0 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.74.0 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.74.0 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libzmq.so.5 /usr/lib/x86_64-linux-gnu/libzmq.so.5 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libsodium.so.23 /usr/lib/x86_64-linux-gnu/libsodium.so.23 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libunbound.so.8 /usr/lib/x86_64-linux-gnu/libunbound.so.8 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libicui18n.so.70 /usr/lib/x86_64-linux-gnu/libicui18n.so.70 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libicuuc.so.70 /usr/lib/x86_64-linux-gnu/libicuuc.so.70 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libbsd.so.0 /usr/lib/x86_64-linux-gnu/libbsd.so.0 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libpgm-5.3.so.0 /usr/lib/x86_64-linux-gnu/libpgm-5.3.so.0 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libnorm.so.1 /usr/lib/x86_64-linux-gnu/libnorm.so.1 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libevent-2.1.so.7 /usr/lib/x86_64-linux-gnu/libevent-2.1.so.7 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libicudata.so.70 /usr/lib/x86_64-linux-gnu/libicudata.so.70 +COPY --from=builder /usr/lib/x86_64-linux-gnu/libmd.so.0 /usr/lib/x86_64-linux-gnu/libmd.so.0 +COPY --from=builder /opt/wownero/build/Linux/_no_branch_/release/bin/wownero* /bin/ \ No newline at end of file