refactor(dockerfile): consolidate consecutive RUNs
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
.. to achieve faster builds
This commit is contained in:
parent
caa4ee3f63
commit
a478b7e689
21
Dockerfile
21
Dockerfile
@ -15,15 +15,18 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
|
|||||||
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz /tmp/hugo.tar.gz
|
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz /tmp/hugo.tar.gz
|
||||||
|
|
||||||
WORKDIR /tmp/
|
WORKDIR /tmp/
|
||||||
RUN pacman -Syu --noconfirm --needed git
|
RUN pacman -Syu --noconfirm --needed git && \
|
||||||
RUN pacman --noconfirm -Rn "$(pacman -Qdtq)" || true
|
pacman --noconfirm -Rn "$(pacman -Qdtq)" || true && \
|
||||||
RUN bsdtar xfv /tmp/hugo.tar.gz && rm -v /tmp/hugo.tar.gz README.md LICENSE \
|
\
|
||||||
&& chmod +x /tmp/hugo \
|
bsdtar xfv /tmp/hugo.tar.gz && rm -v /tmp/hugo.tar.gz README.md LICENSE && \
|
||||||
&& mkdir -pv /usr/local/bin \
|
chmod +x /tmp/hugo && \
|
||||||
&& mv -v /tmp/hugo /usr/local/bin/
|
mkdir -pv /usr/local/bin && \
|
||||||
RUN pacman -Scc && rm -rf /var/cache/pacman/* /var/lib/pacman/sync/* \
|
mv -v /tmp/hugo /usr/local/bin/ && \
|
||||||
&& rm -rf /usr/share/zoneinfo/* ; \
|
\
|
||||||
rm -rf /usr/share/i18n/* ;rm -rf /usr/include/* ; \
|
pacman -Scc && rm -rf /var/cache/pacman/* /var/lib/pacman/sync/* && \
|
||||||
|
rm -rf /usr/share/zoneinfo/*; \
|
||||||
|
rm -rf /usr/share/i18n/*; \
|
||||||
|
rm -rf /usr/include/*; \
|
||||||
find /. -name "*~" -type f -delete; \
|
find /. -name "*~" -type f -delete; \
|
||||||
find /usr/share/terminfo/. ! -name "*xterm*" ! -name "*screen*" ! -name "*screen*" -type f -delete
|
find /usr/share/terminfo/. ! -name "*xterm*" ! -name "*screen*" ! -name "*screen*" -type f -delete
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
Loading…
Reference in New Issue
Block a user