Add image puller helper separate of apply script.
This commit is contained in:
parent
7cb83eae41
commit
7b42579a02
1 changed files with 11 additions and 0 deletions
11
scripts/pull_containers.sh
Normal file
11
scripts/pull_containers.sh
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#!/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)
|
||||||
|
|
||||||
|
for image in "${CONFIG_IMAGES[@]}"; do
|
||||||
|
if [[ ! " ${AVAILABLE_IMAGES[*]} " =~ \ ${image}\ ]]; then
|
||||||
|
echo "Pulling image ${image}"
|
||||||
|
podman pull image "${image}"
|
||||||
|
fi
|
||||||
|
done
|
Reference in a new issue