ability to specify platform arch for air gap install
Signed-off-by: David Gaster <dngaster@gmail.com>
(cherry picked from commit a601ecc468
)
This commit is contained in:
parent
428f1d54c1
commit
e651a6a368
@ -15,6 +15,11 @@ while [[ $# -gt 0 ]]; do
|
|||||||
shift # past argument
|
shift # past argument
|
||||||
shift # past value
|
shift # past value
|
||||||
;;
|
;;
|
||||||
|
-p|--platform)
|
||||||
|
platform="$2"
|
||||||
|
shift # past argument
|
||||||
|
shift # past value
|
||||||
|
;;
|
||||||
-h|--help)
|
-h|--help)
|
||||||
help="true"
|
help="true"
|
||||||
shift
|
shift
|
||||||
@ -28,8 +33,9 @@ while [[ $# -gt 0 ]]; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
usage () {
|
usage () {
|
||||||
echo "USAGE: $0 [--image-list longhorn-images.txt] [--images longhorn-images.tar.gz]"
|
echo "USAGE: $0 [--image-list longhorn-images.txt] [--images longhorn-images.tar.gz] [--platform linux/amd64]"
|
||||||
echo " [-l|--images-list path] text file with list of images. 1 per line."
|
echo " [-l|--images-list path] text file with list of images. 1 per line."
|
||||||
|
echo " [-p|--platform linux/arch] if using images-list path, pulls the image with the specified platform"
|
||||||
echo " [-i|--images path] tar.gz generated by docker save. If this flag is empty, the script does not export images to a tar.gz file"
|
echo " [-i|--images path] tar.gz generated by docker save. If this flag is empty, the script does not export images to a tar.gz file"
|
||||||
echo " [-h|--help] Usage message"
|
echo " [-h|--help] Usage message"
|
||||||
}
|
}
|
||||||
@ -42,7 +48,11 @@ fi
|
|||||||
set -e -x
|
set -e -x
|
||||||
|
|
||||||
for i in $(cat ${list}); do
|
for i in $(cat ${list}); do
|
||||||
docker pull ${i}
|
if [ -n "$platform" ]; then
|
||||||
|
docker pull ${i} --platform $platform
|
||||||
|
else
|
||||||
|
docker pull ${i}
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $images ]]; then
|
if [[ $images ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user