Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install debian package using cloud-init

I'm trying to install netcat using cloud-init.

As soon as I SSH'd to my vm, with all my keys configured correctly via cloud-init (meaning, it's executing), I try to run netcat and it doesn't work;

I'm using Container-Optimized OS (cos) as they refer to use it for cloud-init, and as of research I found cos is based on ChromiumOS kernel;

All I add to my cloud-init file is

packages:
 - nano
 - netcat

And none of them work.

Is there anything I'm missing to be able to add these packages?

like image 402
James Avatar asked Sep 15 '25 16:09

James


1 Answers

Assuming you want to run tools like nano and netcat interactively in that session, you can use the CoreOS toolbox in Container-Optimized OS to install and run these tools.

$ toolbox apt-get install -y nano netcat
$ toolbox nano
like image 74
YaguraStation Avatar answered Sep 18 '25 08:09

YaguraStation