Created
March 22, 2023 09:42
-
-
Save Alceatraz/f80ea53d6971b6c6b772c8bafc1427ef to your computer and use it in GitHub Desktop.
A simple script to download container image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
name=$1 | |
file=$1 | |
file=$(sed "s#/#-#g" <<< "$file") | |
file=$(sed "s#:#-#g" <<< "$file") | |
file="$file.tar.gz" | |
docker pull "your.mirror.site/$name" | |
docker tag "your.mirror.site/$name" "$name" | |
docker save -o "$file" "$name" | |
echo "Image $name saved -> $file" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Download container image through NXMR and export it to tar package.
Then in another server which you need (K3S as demo):
k3s ctr -n k8s.io i import xxxx