| 1 | # | ||
| 2 | # (c) Jan Gehring <jan.gehring@gmail.com> | ||
| 3 | # | ||
| 4 | |||
| 5 | package Rex::Virtualization::Docker::images; | ||
| 6 | |||
| 7 | 1 | ▶ | use v5.14.4; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | our $VERSION = '1.16.1'; # VERSION | |
| 11 | |||
| 12 | 1 | ▶ | use Rex::Logger; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 1 | ▶ | use Rex::Helper::Run; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | 0 | ▶ | sub execute { |
|
Subroutine
execute: not called CC=2 SCAR=17.9
Pod
undocumented
| |||
| 16 | 0 | my ( $class, $arg1 ) = @_; | |
| 17 | 0 | my @domains; | |
| 18 | |||
| 19 | 0 | Rex::Logger::debug("Getting docker images"); | |
| 20 | |||
| 21 | 0 | my @images = | |
| 22 | i_run "docker images --format \"{{.Repository}}:{{.Tag}}:{{.ID}}\"", | ||
| 23 | fail_ok => 1; | ||
| 24 | |||
| 25 | 0 | my @ret = (); | |
| 26 | 0 | for my $line (@images) { | |
| 27 | 0 | my ( $image, $tag, $id ) = split( /:/, $line ); | |
| 28 | 0 | push( | |
| 29 | @ret, | ||
| 30 | { | ||
| 31 | tag => $tag, | ||
| 32 | name => $image, | ||
| 33 | id => $id, | ||
| 34 | } | ||
| 35 | ); | ||
| 36 | } | ||
| 37 | |||
| 38 | 0 | return \@ret; | |
| 39 | } | ||
| 40 | |||
| 41 | 1 | 1; | |