This commit is contained in:
jay 2023-01-11 22:22:13 +08:00
parent ea08fa93da
commit c15cefb010
1 changed files with 27 additions and 0 deletions

View File

@ -77,3 +77,30 @@ if [ -f '/Users/jay/apps/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/jay/ap
alias docker="lima nerdctl"
export DOCKER_HOST="unix:///Users/jay/.lima/docker/sock/docker.sock"
function ln-image-tags {
if [ -z "$1" ]; then
echo "usage: ln-image-tags <image-name>"
exit 1
fi
curlie -L https://registry.lawsnote.com/v2/$1/tags/list
}
function ln-save-image {
if [ -z "$1" ]; then
echo "usage: ln-save-image <image-name:tag>"
exit 1
fi
docker-save --rm -p -o . -i registry.lawsnote.com/$1
}
function minio-size {
if [ -z "$1" ]; then
echo "usage: minio-size <alias or alias/bucket-path>"
exit 1
fi
mc ls -r --json $1 | jq -s 'map(.size) | add' | numfmt --to=iec-i --suffix=B --padding=7
}