2020-03-17 17:44:18 +01:00
|
|
|
FROM archlinux:latest
|
2020-03-04 17:09:02 +01:00
|
|
|
|
2020-04-22 12:11:39 +02:00
|
|
|
ENV HUGO_VERSION 0.69.1
|
2020-03-08 03:30:24 +01:00
|
|
|
|
2020-03-04 17:09:02 +01:00
|
|
|
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."
|
|
|
|
|
2020-03-04 17:09:02 +01:00
|
|
|
LABEL org.label-schema.build-date=$BUILD_DATE \
|
2020-03-04 19:56:34 +01:00
|
|
|
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
|
2020-03-04 17:09:02 +01:00
|
|
|
|
2020-04-22 17:49:44 +02:00
|
|
|
ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz /tmp/hugo.tar.gz
|
2020-03-08 03:43:40 +01:00
|
|
|
|
2020-04-22 17:34:04 +02:00
|
|
|
WORKDIR /tmp/
|
2020-04-22 17:49:44 +02:00
|
|
|
RUN pacman -Sy --noconfirm --needed git && pacman --noconfirm -R $(pacman -Qdtq) \
|
|
|
|
&& bsdtar 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/ \
|
|
|
|
&& pacman --noconfirm -Runs \
|
2020-04-22 17:34:04 +02:00
|
|
|
gzip less sysfsutils which \
|
|
|
|
&& pacman --noconfirm -Runs tar gawk || true \
|
2020-04-22 17:49:44 +02:00
|
|
|
&& pacman -Scc && rm -rfv /var/cache/pacman/* /var/lib/pacman/sync/* \
|
2020-04-22 17:34:04 +02:00
|
|
|
&& 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 /
|