further minify the img by removing cache and docs
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9020ec0e26
commit
878d71070c
22
Dockerfile
22
Dockerfile
@ -14,10 +14,22 @@ 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 ./hugo.tar.gz
|
||||
|
||||
|
||||
RUN pacman -Sy --noconfirm --needed git \
|
||||
&& pacman -Scc \
|
||||
&& rm -rfv /var/cache/pacman/* /var/lib/pacman/sync/*
|
||||
|
||||
WORKDIR /tmp/
|
||||
RUN bsdtar xfv hugo.tar.gz && rm -v hugo.tar.gz README.md LICENSE \
|
||||
&& mv -v hugo /usr/local/bin/
|
||||
|
||||
RUN pacman -Sy --noconfirm --needed git && pacman --noconfirm -R $(pacman -Qdtq)
|
||||
RUN pacman --noconfirm -Runs \
|
||||
gzip less sysfsutils which \
|
||||
&& pacman --noconfirm -Runs tar gawk || true \
|
||||
&& pacman -Scc && rm -rfv /var/cache/pacman/* /var/lib/pacman/sync/*
|
||||
&& rm -rv /usr/share/info/* \
|
||||
&& rm -rv /usr/share/man/* \
|
||||
&& rm -rv /usr/share/doc/* \
|
||||
&& rm -rv /usr/share/zoneinfo/* \
|
||||
&& rm -rv /usr/share/i18n/* \
|
||||
&& find /. -name "*~" -type f -delete \
|
||||
&& find /usr/share/terminfo/. ! -name "*xterm*" ! -name "*screen*" ! -name "*screen*" -type f -delete \
|
||||
&& rm -rv /tmp/* \
|
||||
&& rm -rv /usr/include/*
|
||||
WORKDIR /
|
||||
|
Loading…
Reference in New Issue
Block a user