File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,9 +12,13 @@ RUN case "${TARGETARCH}" in \
1212 arm64) HUGO_ARCH="arm64" ;; \
1313 *) echo "Unsupported TARGETARCH: ${TARGETARCH}" >&2; exit 1 ;; \
1414 esac \
15- && wget -q -O /tmp/hugo.tar.gz "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${HUGO_ARCH}.tar.gz" \
16- && tar -xzf /tmp/hugo.tar.gz -C /usr/local/bin hugo \
17- && rm -f /tmp/hugo.tar.gz
15+ && HUGO_TARBALL="hugo_extended_${HUGO_VERSION}_linux-${HUGO_ARCH}.tar.gz" \
16+ && wget -q -O "/tmp/${HUGO_TARBALL}" "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_TARBALL}" \
17+ && wget -q -O /tmp/hugo_checksums.txt "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_checksums.txt" \
18+ && grep " ${HUGO_TARBALL}\$ " /tmp/hugo_checksums.txt > /tmp/hugo_checksums_entry.txt \
19+ && sha256sum -c /tmp/hugo_checksums_entry.txt \
20+ && tar -xzf "/tmp/${HUGO_TARBALL}" -C /usr/local/bin hugo \
21+ && rm -f "/tmp/${HUGO_TARBALL}" /tmp/hugo_checksums.txt /tmp/hugo_checksums_entry.txt
1822
1923WORKDIR /src
2024
You can’t perform that action at this time.
0 commit comments