Skip to content

Instantly share code, notes, and snippets.

@squizzi
Last active August 23, 2018 21:58
Show Gist options
  • Save squizzi/9c447876e19a92334b3d51c54ff26b3e to your computer and use it in GitHub Desktop.
Save squizzi/9c447876e19a92334b3d51c54ff26b3e to your computer and use it in GitHub Desktop.
when you need to download a silly amount of images for a silly reproducer
#!/bin/bash
# Search terms are of images and their derivatives that should be
# relatively small in size it's a total guessing game but whatever
declare -a searchTerms=(
"alpine" "fedora" "ubuntu" "python" "small" "curl" "busybox" "mini" "hello-world" "graphql" "tiny"
"cirros" "opensuse" "dind" "maven" "multistage"
)
for element in "${searchTerms[@]}"
do
for each in $(docker search $element --limit 100 | awk '{print $1}')
do
docker pull $each
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment