From 955796c47ae9ccf2b711ad40f0d47e4a04ab9c0e Mon Sep 17 00:00:00 2001 From: mag37 Date: Tue, 21 Feb 2023 21:04:01 +0100 Subject: [PATCH] Delete dupc_function.sh --- dupc_function.sh | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 dupc_function.sh diff --git a/dupc_function.sh b/dupc_function.sh deleted file mode 100644 index 2ed8526..0000000 --- a/dupc_function.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -### Requires the regctl binary. -### Get it here: https://github.com/regclient/regclient/releases - -### Preferably placed in .bashrc or similar - -### Set the full path to the binary or just regctl if in PATH: -regctl="/home/gw-tdc/dockers/regctl" - -dupc () { - if [[ "$@" == "help" ]]; then - echo "No container name given, here's the list of currently running containers:" - docker ps --format '{{.Names}}' - else - for i in $(docker ps --filter "name=$@" --format '{{.Names}}') - do - RepoUrl=$(docker inspect $i --format='{{.Config.Image}}') - LocalHash=$(docker image inspect $RepoUrl --format '{{.RepoDigests}}') - RegHash=$($regctl image digest --list $RepoUrl 2>/dev/null) - if [ $? -eq 0 ] ; then - if [[ "$LocalHash" = *"$RegHash"* ]] ; then printf "$i is already latest.\n" ; else printf "$i got updates.\n" ; fi - else - printf "$i got errors, no check possible.\n" - fi - done - fi -} -dupc $1