1
mirror of https://github.com/jakejarvis/hugo-docker.git synced 2025-04-26 07:15:23 -04:00

clone source from Git repo instead of downloading from GitHub release

This commit is contained in:
Jake Jarvis 2021-03-14 11:28:44 -04:00
parent 30f54331e8
commit 2cf9bd62af
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39

View File

@ -25,12 +25,21 @@ RUN apk update && \
apk add --no-cache \
gcc \
g++ \
musl-dev && \
musl-dev \
git && \
go get github.com/magefile/mage
RUN wget https://github.com/gohugoio/hugo/archive/v${HUGO_VERSION}.tar.gz && \
tar xf v${HUGO_VERSION}.tar.gz --strip-components=1 && \
rm v${HUGO_VERSION}.tar.gz
# clone source from Git repo:
RUN git clone \
--branch "v${HUGO_VERSION}" \
--single-branch \
--depth 1 \
https://github.com/gohugoio/hugo.git ./
# download source from GitHub release (old method):
# RUN wget https://github.com/gohugoio/hugo/archive/v${HUGO_VERSION}.tar.gz && \
# tar xf v${HUGO_VERSION}.tar.gz --strip-components=1 && \
# rm v${HUGO_VERSION}.tar.gz
RUN mage -v hugo && mage install