Skip to content

Commit 2ffd997

Browse files
CopilotPol-Lanski
andcommitted
fix: correct sha256 checksum verification path for gohttpserver
Co-authored-by: Pol-Lanski <19168735+Pol-Lanski@users.noreply.github.com>
1 parent 4d42026 commit 2ffd997

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ RUN ARCH=$(dpkg --print-architecture) && \
5353
TARBALL="gohttpserver_1.3.0_linux_${GHS_ARCH}.tar.gz" && \
5454
curl -fsSL "https://github.com/codeskyblue/gohttpserver/releases/download/1.3.0/${TARBALL}" \
5555
-o "/tmp/${TARBALL}" && \
56-
curl -fsSL "https://github.com/codeskyblue/gohttpserver/releases/download/1.3.0/gohttpserver_1.3.0_checksums.txt" \
57-
| grep "${TARBALL}" | sha256sum --check --status && \
56+
EXPECTED=$(curl -fsSL "https://github.com/codeskyblue/gohttpserver/releases/download/1.3.0/gohttpserver_1.3.0_checksums.txt" \
57+
| grep "${TARBALL}" | awk '{print $1}') && \
58+
ACTUAL=$(sha256sum "/tmp/${TARBALL}" | awk '{print $1}') && \
59+
[ "$EXPECTED" = "$ACTUAL" ] || (echo "Checksum mismatch for ${TARBALL}" && exit 1) && \
5860
tar -xz -C /usr/local/bin --strip-components=0 -f "/tmp/${TARBALL}" gohttpserver && \
5961
chmod +x /usr/local/bin/gohttpserver && \
6062
rm "/tmp/${TARBALL}"

0 commit comments

Comments
 (0)