chore(docker): get remote images' digest without pulling them

This commit is contained in:
Michele Cereda
2025-02-04 23:45:52 +01:00
parent 8b626edc28
commit f20a5c1d24
2 changed files with 4 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env sh
# `tar -a` guesses the compression algorithm from the archive extension
# Create archives
tar czvf "/tmp/prometheus-data-$(date +'%s-%F-%H-%m-%S').tar.gz" '/var/lib/prometheus/data'
tar cjpvf 'docs.tar.bz2' "${HOME}/Documents" "${HOME}/Downloads" 'docs.txt'
# List the contents of archives
tar tf "/tmp/prometheus-data-1718104097-2024-06-11-11-06-17.tar.gz"
tar tf 'kubectl.tar' 'kubectl'
# Test archives by reading their contents or extracting them to stdout.
tar tf 'archive.tar' > '/dev/null'
tar tOf 'archive.tar' > '/dev/null'
# Extract archives
tar xf 'portage-latest.tar.xz' -C '/mnt/gentoo/usr'
tar xpf 'stage3-amd64-'*'.tar.xz' --checkpoint '250'