Reduced image size

This commit is contained in:
2024-05-11 21:59:20 +02:00
parent 8d40348e45
commit 65b6de3278
+8 -17
View File
@@ -7,31 +7,28 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update RUN apt-get update
# Required dependencies # Required dependencies
RUN apt-get install -y libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libevent-dev libssl-dev RUN apt-get install -y --no-install-recommends libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libevent-dev libssl-dev
# Qt (required for dogecoin-qt GUI) # Qt (required for dogecoin-qt GUI)
RUN apt-get install -y libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler RUN apt-get install -y --no-install-recommends libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
RUN apt-get install -y libqrencode-dev RUN apt-get install -y --no-install-recommends libqrencode-dev
RUN apt-get install -y libxkbcommon-x11-0 libxcb-xinerama0 libx11-xcb1 libx11-xcb-dev libqt5x11extras5 RUN apt-get install -y --no-install-recommends libxkbcommon-x11-0 libxcb-xinerama0 libx11-xcb1 libx11-xcb-dev libqt5x11extras5
# BerkeleyDB (version 5.3) # BerkeleyDB (version 5.3)
RUN apt-get install -y libdb5.3++-dev libdb5.3++ libdb5.3-dev RUN apt-get install -y --no-install-recommends libdb5.3++-dev libdb5.3++ libdb5.3-dev
# ZMQ (provides ZMQ API 4.x) # ZMQ (provides ZMQ API 4.x)
RUN apt-get install -y libzmq3-dev RUN apt-get install -y --no-install-recommends libzmq3-dev
# Miniupnpc # Miniupnpc
# RUN apt-get install -y libminiupnpc-dev # RUN apt-get install -y libminiupnpc-dev
# ------------------------------------- # -------------------------------------
FROM base as build_base FROM base as build
# Build tools # Build tools
RUN apt-get install -y build-essential libtool autotools-dev automake pkg-config bsdmainutils git autogen make gawk file RUN apt-get install -y build-essential libtool autotools-dev automake pkg-config bsdmainutils git autogen make gawk file
# -------------------------------------
FROM build_base as build
ADD https://github.com/dogecoin/dogecoin.git /tmp/dogecoin ADD https://github.com/dogecoin/dogecoin.git /tmp/dogecoin
WORKDIR "/tmp/dogecoin" WORKDIR "/tmp/dogecoin"
@@ -42,13 +39,7 @@ WORKDIR "/tmp/dogecoin"
RUN make -j4 && make install RUN make -j4 && make install
# ------------------------------------- # -------------------------------------
FROM base as slim_base FROM base as app
RUN apt-get purge -y python3
RUN apt-get autoremove --purge -y
RUN apt-get clean -y
# -------------------------------------
FROM slim_base as app
COPY --from=build /opt/dogecoin /opt/dogecoin COPY --from=build /opt/dogecoin /opt/dogecoin
RUN rm /opt/dogecoin/bin/bench_dogecoin* RUN rm /opt/dogecoin/bin/bench_dogecoin*
RUN rm /opt/dogecoin/bin/test_dogecoin* RUN rm /opt/dogecoin/bin/test_dogecoin*