| 1 | package Langertha::Knarr::CLI::Cmd::Container; | ||
| 2 | 37 | our $VERSION = '1.103'; | |
| 3 | # ABSTRACT: Alias for 'knarr start --from-env -p 8080 -p 11434' (Docker mode) | ||
| 4 | 37 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 37 | ▶ | use MooX::Cmd; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 37 | ▶ | use MooX::Options protect_argv => 0, usage_string => 'USAGE: knarr container [options]'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 37 | ▶ | use Langertha::Knarr::CLI::Cmd::Start; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | |||
| 10 | 2 | ▶ | sub execute { |
|
Subroutine
execute: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 11 | 2 | my ($self, $args, $chain) = @_; | |
| 12 | 2 | print STDERR "[knarr] NOTE: 'knarr container' is now 'knarr start --from-env -p 8080 -p 11434'\n"; | |
| 13 | 2 | $self->start_command->execute($args, $chain); | |
| 14 | } | ||
| 15 | |||
| 16 | # The start command this alias runs: the Docker image's own (k46). | ||
| 17 | 2 | ▶ | sub start_command { |
|
Subroutine
start_command: called CC=1 SCAR=0.0
Pod
documented
| |||
| 18 | 2 | my ($self) = @_; | |
| 19 | 2 | return Langertha::Knarr::CLI::Cmd::Start->new( | |
| 20 | from_env => 1, | ||
| 21 | host => '0.0.0.0', | ||
| 22 | port => [ 8080, 11434 ], | ||
| 23 | ); | ||
| 24 | } | ||
| 25 | |||
| 26 | |||
| 27 | 37 | 1; | |
| 28 | |||
| 29 | __END__ | ||