feat: rm redundancies and refactor
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
* only autoremove once - right before cleaning all dnf caches * move the dir cleanup to the place where related file handling occurs * for all this, add a separate RUN instruction
This commit is contained in:
parent
bd25834bb9
commit
250e9f710d
14
Dockerfile
14
Dockerfile
@ -15,15 +15,15 @@ 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 dnf --refresh upgrade -y && dnf install -y git findutils && dnf autoremove -y
|
RUN dnf --refresh upgrade -y && dnf install -y git findutils
|
||||||
RUN tar xfv /tmp/hugo.tar.gz && rm -v /tmp/hugo.tar.gz README.md LICENSE \
|
RUN tar xfv /tmp/hugo.tar.gz && rm -v /tmp/hugo.tar.gz README.md LICENSE \
|
||||||
&& chmod +x /tmp/hugo \
|
&& chmod +x /tmp/hugo \
|
||||||
&& mkdir -pv /usr/local/bin \
|
&& mkdir -pv /usr/local/bin \
|
||||||
&& mv -v /tmp/hugo /usr/local/bin/
|
&& mv -v /tmp/hugo /usr/local/bin/ \
|
||||||
RUN dnf clean all -y \
|
&& rm -rv /tmp/*
|
||||||
&& rm -rv /usr/share/zoneinfo/* ; rm -rv /usr/include/* ; \
|
RUN dnf autoremove -y -x findutils \
|
||||||
|
&& dnf clean all -y
|
||||||
|
RUN rm -rv /usr/share/zoneinfo/* ; rm -rv /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
|
||||||
rm -rv /tmp/* ; \
|
|
||||||
dnf autoremove -y -x findutils; dnf clean all -y || true
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
Loading…
Reference in New Issue
Block a user