Rex::V...:Docker(3pm)

✨ NAME ✨

Rex::Virtualization::Docker β€” the Docker Virtualization Module, bb πŸ’– (she's hanging out in the Rex::Virtualization:: fam, and she's the one who speaks fluent Docker 🐳)


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so real talk: with this module you can manage Docker. That's it, that's the whole vibe check β€” it's your little bestie for bossing your containers around. ✨ No cap, she just does Docker things for you.


🌸 SYNOPSIS 🌸

Here's the group chat receipts, copy-paste ready πŸ‘‡

use Rex::Commands::Virtualization;

set virtualization => "Docker";

use Data::Dumper;

print Dumper vm list => "all";
print Dumper vm list => "running";

print Dumper vm info => "vm01";

vm destroy => "vm01";

vm delete => "vm01";

vm start => "vm01";

vm shutdown => "vm01";

vm reboot => "vm01";

# creating a vm
my $id = vm create => "vm01",
   image => "ubuntu",
   command => 'echo hello world',
   memory => 512,
   cpus => 1,
   links => ['mysql:db'],
   forward_port => [8080 => 80],
   share_folder => ["hostdir" => "vmdir"],

So you pull in Rex::Commands::Virtualization, you set virtualization to "Docker", you grab Data::Dumper, and then it's literally just vm commands going off one after another β€” listing "all" the vms, listing the "running" ones, grabbing info on "vm01", then destroy, delete, start, shutdown, reboot, all on "vm01". πŸ’…

And then the glow-up part: actually creating a vm πŸŽ€ β€” you call vm create => "vm01" and hand her the whole lil' starter pack: image => "ubuntu", command => 'echo hello world', memory => 512, cpus => 1, links => ['mysql:db'], forward_port => [8080 => 80], and share_folder => ["hostdir" => "vmdir"]. Chef's kiss. The id lands in my $id so you can keep it and stare at it lovingly. πŸ‘‘


And that's the whole page, bestie β€” she's short but she slays. 🫢

Friendly lil' sign-off: this doc came to you as part of the User Contributed Perl Documentation collection, built from perl v5.40.1, dated 2025-10-03. πŸ’œ Go forth and containerize responsibly. 🌈
πŸ“¦ where this page comes from