Skip to content

Commit c4d48a2

Browse files
committed
fix(downloader): extract only the shim binary from the archive
Signed-off-by: Vaughn Dice <vdice@akamai.com>
1 parent f1b48df commit c4d48a2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

images/downloader/download_shim.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ log "$(tar --version)" "INFO"
3333
log "md5sum: $(md5sum containerd-shim-${SHIM_NAME})" "INFO"
3434
log "sha256sum: $(sha256sum containerd-shim-${SHIM_NAME})" "INFO"
3535

36-
tar -xzf "containerd-shim-${SHIM_NAME}" -C /assets
36+
tar -xzf "containerd-shim-${SHIM_NAME}" -C /tmp
37+
# there may be multiple files in the archive; only copy the shim binary to /assets
38+
cp /tmp/containerd-shim-${SHIM_NAME} /assets
3739
log "download successful:" "INFO"
3840

3941
# Verify SHA-256 if provided
4042
if [ -n "${SHIM_SHA256:-}" ]; then
4143
log "verifying SHA-256 digest..." "INFO"
42-
if echo "${SHIM_SHA256} containerd-shim-${SHIM_NAME}" | sha256sum -c -; then
44+
if echo "${SHIM_SHA256} containerd-shim-${SHIM_NAME}" | sha256sum -c -; then
4345
log "SHA-256 verification passed" "INFO"
4446
else
4547
log "SHA-256 verification FAILED: expected ${SHIM_SHA256} for containerd-shim-${SHIM_NAME}" "ERROR"

0 commit comments

Comments
 (0)