6 changed files with 50 additions and 41 deletions
@ -0,0 +1,26 @@
|
||||
#!/bin/bash -x |
||||
|
||||
image=$1 |
||||
|
||||
docker run --entrypoint /bin/bash -u root {{ registry_domain }}/$image -c "apt-get update; apt-get upgrade --assume-no" |
||||
if [ $? -eq 1 ] |
||||
then |
||||
echo "update ${image}" |
||||
if [ "$image" == "debian" ] |
||||
then |
||||
laminarc queue base_image |
||||
else |
||||
build_image $image |
||||
fi |
||||
exit 0 |
||||
fi |
||||
|
||||
echo "check for updates of child images of ${image}" |
||||
base="{{ registry_domain }}/$1" |
||||
for i in `curl -s -X GET {{ registry }}/v2/_catalog | jq -r '.repositories[]'` |
||||
do |
||||
if [ ! -z "`grep "FROM ${base}" {{ laminar_home }}/repos/${i}/Dockerfile`" ] |
||||
then |
||||
check_updates $i |
||||
fi |
||||
done |
@ -1,15 +1,3 @@
|
||||
#!/bin/bash -x |
||||
#!/bin/bash -ex |
||||
|
||||
for image in `curl -s -X GET {{ registry_domain }}/v2/_catalog | jq -r '.repositories[]'` |
||||
do |
||||
if [ "$image" == "debian" ] |
||||
then |
||||
continue |
||||
fi |
||||
|
||||
docker run --entrypoint /bin/bash -u root {{ registry_domain }}/$image -c "apt-get update; apt-get upgrade --assume-no" |
||||
if [ $? -eq 1 ] |
||||
then |
||||
build_image $image |
||||
fi |
||||
done |
||||
check_updates "debian" |
||||
|
Loading…
Reference in new issue