mirror of
https://github.com/nextcloud/vm.git
synced 2025-10-26 11:27:32 +00:00
get the latest image tag
This commit is contained in:
parent
4b26f29cda
commit
9f03fc84ec
@ -20,6 +20,22 @@ debug_mode
|
||||
readonly DB_FILE="$DOCKERBACKUP/images.db"
|
||||
readonly IMG_DIR="$DOCKERBACKUP/images"
|
||||
|
||||
# Update docker images
|
||||
# This updates ALL Docker images:
|
||||
if [ "$(docker ps -a >/dev/null 2>&1 && echo yes || echo no)" == "yes" ]
|
||||
then
|
||||
docker images --format "{{.Repository}}:{{.Tag}}" | grep :latest | xargs -L1 docker pull
|
||||
fi
|
||||
|
||||
if [ -f $SCRIPTS/dockerprune.sh ]
|
||||
then
|
||||
bash $SCRIPTS/dockerprune.sh
|
||||
else
|
||||
docker container prune -f
|
||||
docker image prune -a -f
|
||||
docker volume prune -f
|
||||
fi
|
||||
|
||||
save_images() {
|
||||
echo "Create ${IMG_DIR}"
|
||||
if [[ ! -d "${IMG_DIR}" ]]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user