docker-fedora-hugo/Dockerfile
surtur 753b3718e0
All checks were successful
continuous-integration/drone/push Build is passing
fix: correct dnf autoremove behaviour
* findutils was mistakenly getting removed at the end of each build
  while what I intended to do instead was to prevent removal of the
  package by autoremove and only use the -y flag to signal an always-yes
2020-12-29 01:47:03 +01:00

30 lines
1.1 KiB
Docker

FROM fedora:33
ENV HUGO_VERSION 0.79.1
ARG BUILD_DATE
ARG VCS_REF
LABEL description="Docker image for building websites with Hugo static site generator."
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url="https://git.dotya.ml/wanderer/docker-archlinux-hugo.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.license=GPL-3.0
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/
RUN dnf --refresh upgrade -y && dnf install -y git findutils && dnf autoremove -y
RUN tar xfv /tmp/hugo.tar.gz && rm -v /tmp/hugo.tar.gz README.md LICENSE \
&& chmod +x /tmp/hugo \
&& mkdir -pv /usr/local/bin \
&& mv -v /tmp/hugo /usr/local/bin/
RUN dnf clean all -y \
&& rm -rv /usr/share/zoneinfo/* ; rm -rv /usr/include/* ; \
find /. -name "*~" -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 /