From eccff94f34d0bc8d09b0533ae4fab2acb530c04b Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 1 May 2023 17:46:25 +0200 Subject: Dockerfile: refactoring --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 995f4a2..47312bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,8 @@ ARG install_dir="/app/install" FROM base AS builder -RUN apk add -q --no-cache bash bsd-compat-headers build-base clang cmake libgit2-dev python3 sqlite-dev +RUN build_deps='bash bsd-compat-headers build-base clang cmake libgit2-dev python3 sqlite-dev' && \ + apk add -q --no-cache $build_deps ARG C_COMPILER=clang ARG BUILD_TYPE=Release @@ -26,7 +27,8 @@ FROM base LABEL maintainer="Egor Tensin " -RUN apk add -q --no-cache tini libgit2 sqlite-dev +RUN runtime_deps='tini libgit2 sqlite-dev' && \ + apk add -q --no-cache $runtime_deps ARG install_dir COPY --from=builder ["$install_dir", "$install_dir"] -- cgit v1.2.3