simplified script.
This commit is contained in:
parent
7b42579a02
commit
7343bef3cf
1 changed files with 2 additions and 5 deletions
5
scripts/pull_containers.sh
Normal file → Executable file
5
scripts/pull_containers.sh
Normal file → Executable file
|
@ -1,11 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
mapfile -t AVAILABLE_IMAGES < <(run show container image | awk '{ if ( NR > 1 ) { print $1 ":" $2} }')
|
|
||||||
mapfile -t CONFIG_IMAGES < <(find /config/config-parts/ -type f -exec sed -nr "s/set container name .* image '(.*)'/\1/p" {} + | sort | uniq)
|
mapfile -t CONFIG_IMAGES < <(find /config/config-parts/ -type f -exec sed -nr "s/set container name .* image '(.*)'/\1/p" {} + | sort | uniq)
|
||||||
|
|
||||||
for image in "${CONFIG_IMAGES[@]}"; do
|
for image in "${CONFIG_IMAGES[@]}"; do
|
||||||
if [[ ! " ${AVAILABLE_IMAGES[*]} " =~ \ ${image}\ ]]; then
|
|
||||||
echo "Pulling image ${image}"
|
echo "Pulling image ${image}"
|
||||||
podman pull image "${image}"
|
podman pull "${image}"
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
Reference in a new issue