refactor(dockerfile): consolidate consecutive RUNs
All checks were successful
continuous-integration/drone/push Build is passing

.. to achieve faster builds
This commit is contained in:
surtur 2022-03-24 16:54:49 +01:00
parent f6ef061f38
commit ff22968fc6
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -9,12 +9,18 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.license=GPL-3.0
RUN pacman --version
RUN pacman -Syu --noconfirm --needed gcc cmake make git valgrind
RUN pacman --noconfirm -Rn "$(pacman -Qdtq)" || true
RUN pacman -Scc && rm -rf /var/cache/pacman/* /var/lib/pacman/sync/* \
&& rm -rf /usr/share/info/* ;rm -rf /usr/share/man/* ; \
rm -rf /usr/share/doc/* ;rm -rf /usr/share/zoneinfo/* ;rm -rf /usr/share/i18n/*; \
find /. -name "*~" -type f -delete; \
find /usr/share/terminfo/. ! -name "*xterm*" ! -name "*screen*" ! -name "*screen*" -type f -delete;
RUN pacman --version && \
\
\
pacman -Syu --noconfirm --needed gcc cmake make git valgrind && \
pacman --noconfirm -Rn "$(pacman -Qdtq)" || true && \
pacman -Scc && \
\
rm -rf /var/cache/pacman/* /var/lib/pacman/sync/* && \
rm -rf /usr/share/info/*; \
rm -rf /usr/share/man/*; \
rm -rf /usr/share/doc/*; \
rm -rf /usr/share/zoneinfo/*; \
rm -rf /usr/share/i18n/*; \
find /. -name "*~" -type f -delete; \
find /usr/share/terminfo/. ! -name "*xterm*" ! -name "*screen*" ! -name "*screen*" -type f -delete;