Skip to content

Commit 4265298

Browse files
yqtian-seCopilot
andauthored
Update Dockerfile
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent d511e24 commit 4265298

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff 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

1923
WORKDIR /src
2024

0 commit comments

Comments
 (0)