Got this docker command I want to run. Note the tail command at the end for keeping the container up and running.
docker run -d --name xxxyyyzzz-blah alpine /bin/ash -c "/usr/bin/tail +-f /dev/null"
The following backtick operation runs this command with no issue and the container is detached from and the container is left still running:
use v5.38; `docker run -d --name xxxyyyzzz-blah alpine /bin/ash -c "/usr/bin/tail + -f /dev/null"`;
However, with the IPC::Run3 module, the container gets set up, but the tail command never seems to get executed and the container exits immediately:
use v5.38; use IPC::Run3; my $cmd = [ 'docker', 'run', '-d', '--name', 'xxxyyyzzz-blah', 'alpine +', '/bin/ash', '-c', '"/usr/bin/tail -f /dev/null"' ]; my ($out, $err); my $success = run3($cmd, undef, \$out, \$err); print $success; # prints 1
I tried breaking up the the last element into 3 different elements separated by spaces but that didn't help.
$PM = "Perl Monk's";
$MC = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar Parson";
$nysus = $PM . ' ' . $MC;
Click here if you love Perl Monks
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |