docker-archlinux-hugo/Dockerfile

30 lines
1.2 KiB
Docker
Raw Normal View History

FROM immawanderer/archlinux:latest
ENV HUGO_VERSION 0.78.1
ARG BUILD_DATE
ARG VCS_REF
2020-03-11 19:04:49 +01:00
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://github.com/wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf/docker-archlinux-hugo.git" \
2020-03-17 04:40:50 +01:00
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/
2020-06-01 00:34:21 +02:00
RUN pacman -Syu --noconfirm --needed git && pacman --noconfirm -R $(pacman -Qdtq) || true
2020-04-22 18:53:32 +02:00
RUN bsdtar xfv /tmp/hugo.tar.gz && rm -v /tmp/hugo.tar.gz README.md LICENSE \
&& chmod +x /tmp/hugo \
&& mkdir -pv /usr/local/bin \
2020-06-02 21:53:31 +02:00
&& mv -v /tmp/hugo /usr/local/bin/
2020-04-22 18:50:17 +02:00
RUN pacman -Scc && rm -rfv /var/cache/pacman/* /var/lib/pacman/sync/* \
2020-06-02 21:53:31 +02:00
&& rm -rv /usr/share/zoneinfo/* ; \
2020-06-02 21:54:51 +02:00
rm -rv /usr/share/i18n/* ;rm -rv /usr/include/* ; \
find /. -name "*~" -type f -delete; \
2020-04-22 21:14:42 +02:00
find /usr/share/terminfo/. ! -name "*xterm*" ! -name "*screen*" ! -name "*screen*" -type f -delete; \
2020-04-22 21:41:24 +02:00
rm -rv /tmp/* || true
WORKDIR /