| 1 | # | ||||||||||
| 2 | # (c) Jan Gehring <jan.gehring@gmail.com> | ||||||||||
| 3 | # | ||||||||||
| 4 | |||||||||||
| 5 | package Rex::Virtualization::Docker::daemon; | ||||||||||
| 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=4 SCAR=30.0
Pod
undocumented
| |||||||||||
| 16 | 0 | my ( $class, %opt ) = @_; | |||||||||
| 17 | |||||||||||
| 18 | 0 | ▶ | my $bind = defined $opt{bind} ? $opt{bind} : '0.0.0.0'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 0 | ▶ | my $host = defined $opt{host} ? $opt{host} : 'unix:///var/run/docker.sock'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | |||||||||||
| 21 | 0 | Rex::Logger::debug("starting docker daemon"); | |||||||||
| 22 | |||||||||||
| 23 | 0 | i_run "docker -d -H $host -ip $bind", fail_ok => 1; | |||||||||
| 24 | 0 | ▶ | if ( $? != 0 ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | 0 | die("Error starting docker daemon"); | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 1 | 1; | |||||||||