Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install nano on boot2docker

I'm running the boot2docker VM in windows and need to modify the init scripts within the VM. Currently my only option is VI, and it's a pain. I'd just like to use nano, but it's not available.

It's running:

docker@boot2docker:/c$ uname -a
Linux boot2docker 3.18.5-tinycore64 #1 SMP Sun Feb 1 06:02:30 UTC 2015 x86_64 GNU/Linux

There is no apt-get or any package manager. How can I just get nano added so I can edit files easily?

EDIT:

@John-Petrone 's answer works, but after it's installed, running nano gives the error:

Error opening terminal: cygwin.

In case anyone else has that problem, the issue is $TERM was set to cygwin. Not sure why. I just:

TERM=xterm-color

And then nano worked! ( if set to any other available terms in /usr/share/terminfo/x funky characters showed up )

like image 443
phazei Avatar asked Feb 26 '15 03:02

phazei


1 Answers

Boot2Docker is based on Tiny Linux which uses tce-load to install packages. The list of packages in the repository can be found here:

http://distro.ibiblio.org/tinycorelinux/tcz_2x.html

You'll see that the nano packages is nano.tcz , so you'll run something like:

tce-load -wi nano

This article: http://lowtek.ca/roo/2015/modify-boot2docker-iso/ should also be helpful along with this one: http://www.gerrelt.nl/RaspberryPi/wordpress/tutorial-unpluggable-squeezelite-player-on-tinycore/#Search_and_install_NANO_extension

like image 50
John Petrone Avatar answered Oct 26 '22 06:10

John Petrone