Skip to content

Commit

Permalink
dockerfile: add apt cache volume for faster rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
khancyr committed Aug 29, 2024
1 parent 78cae5a commit c32f7e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

Expand Down

0 comments on commit c32f7e7

Please sign in to comment.