From c90d9a0dc045708d3995b7a6afe7b12ab2d768aa Mon Sep 17 00:00:00 2001 From: Mogeko Date: Sat, 20 Nov 2021 09:41:49 +0000 Subject: [PATCH] feat: use a base image to share the dependency --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1f39e9a..1b55d81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ -FROM alpine:3.14 as libtorrent_builder +FROM alpine:3.14 as base_clang -RUN apk add --no-cache boost-dev build-base clang-dev cmake libtool openssl-dev git +RUN apk add --no-cache boost-build boost-dev build-base clang-dev cmake + +FROM base_clang as libtorrent_builder + +RUN apk add --no-cache cmake openssl-dev git WORKDIR /workspace @@ -14,9 +18,9 @@ RUN cmake . -DCMAKE_BUILD_TYPE=Release \ && make -j$(nproc) \ && make install -FROM alpine:3.14 as qbittorrent_builder +FROM base_clang as qbittorrent_builder -RUN apk add --no-cache boost-dev build-base clang-dev cmake qt5-qtbase-dev qt5-qttools-dev git +RUN apk add --no-cache cmake qt5-qtbase-dev qt5-qttools-dev git COPY --from=libtorrent_builder /workspace/pkg /usr