Jarno Rankinen revisó este gist . Ir a la revisión
1 file changed, 1 insertion, 1 deletion
find_tags.sh
@@ -5,7 +5,7 @@ if [[ "$#" -eq 0 ]]; then | |||
5 | 5 | IMAGE The image to search | |
6 | 6 | Examples: httpd, lousilam/uptime-kuma | |
7 | 7 | INCLUDE Include results containing INCLUDE | |
8 | - | Pass \"\" to only use EXCLUDE filtering | |
8 | + | Pass '' to only use EXCLUDE filtering | |
9 | 9 | EXCLUDE Exclude results containing EXCLUDE | |
10 | 10 | " | |
11 | 11 | exit 1 |
Jarno Rankinen revisó este gist . Ir a la revisión
2 files changed, 22 insertions, 10 deletions
find_tags.sh(archivo creado)
@@ -0,0 +1,22 @@ | |||
1 | + | #!/bin/bash | |
2 | + | ||
3 | + | if [[ "$#" -eq 0 ]]; then | |
4 | + | echo "Usage: $0 IMAGE [INCLUDE] [EXCLUDE] | |
5 | + | IMAGE The image to search | |
6 | + | Examples: httpd, lousilam/uptime-kuma | |
7 | + | INCLUDE Include results containing INCLUDE | |
8 | + | Pass \"\" to only use EXCLUDE filtering | |
9 | + | EXCLUDE Exclude results containing EXCLUDE | |
10 | + | " | |
11 | + | exit 1 | |
12 | + | fi | |
13 | + | ||
14 | + | image=$1 | |
15 | + | filter=$2 | |
16 | + | notfilter=${3:- } | |
17 | + | jqfilter=".RepoTags[] \ | |
18 | + | | select(contains(\"$filter\")) \ | |
19 | + | | select(contains(\"$notfilter\") | not)" | |
20 | + | ||
21 | + | skopeo inspect "docker://$image" \ | |
22 | + | | jq -r "$jqfilter" |
skopeo_list_tags.sh (archivo eliminado)
@@ -1,10 +0,0 @@ | |||
1 | - | #!/bin/bash | |
2 | - | image=$1 | |
3 | - | filter=$2 | |
4 | - | notfilter=${3:- } | |
5 | - | jqfilter=".RepoTags[] \ | |
6 | - | | select(contains(\"$filter\")) \ | |
7 | - | | select(contains(\"$notfilter\") | not)" | |
8 | - | ||
9 | - | skopeo inspect "docker://$image" \ | |
10 | - | | jq -r "$jqfilter" |
Jarno Rankinen revisó este gist . Ir a la revisión
1 file changed, 10 insertions
skopeo_list_tags.sh(archivo creado)
@@ -0,0 +1,10 @@ | |||
1 | + | #!/bin/bash | |
2 | + | image=$1 | |
3 | + | filter=$2 | |
4 | + | notfilter=${3:- } | |
5 | + | jqfilter=".RepoTags[] \ | |
6 | + | | select(contains(\"$filter\")) \ | |
7 | + | | select(contains(\"$notfilter\") | not)" | |
8 | + | ||
9 | + | skopeo inspect "docker://$image" \ | |
10 | + | | jq -r "$jqfilter" |