From c32f7e73d10aac253f06cd96a6510cfa3e072d60 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Thu, 29 Aug 2024 21:32:55 +0200 Subject: [PATCH] dockerfile: add apt cache volume for faster rebuild --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4207323136..ab62a50803 100755 --- a/Dockerfile +++ b/Dockerfile @@ -27,7 +27,8 @@ RUN echo "${USER_NAME} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/${USER_NAME} \ USER ${USER_NAME} COPY Sphinxsetup.sh ${WORKDIRECTORY}/Sphinxsetup.sh -RUN bash -c "${WORKDIRECTORY}/Sphinxsetup.sh" && rm Sphinxsetup.sh +RUN --mount=type=cache,target=/var/cache/apt \ + bash -c "${WORKDIRECTORY}/Sphinxsetup.sh" && rm Sphinxsetup.sh RUN sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*