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:
parent
30f54331e8
commit
2cf9bd62af
17
Dockerfile
17
Dockerfile
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user