46

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 )

phazei
  • 5,323
  • 5
  • 42
  • 46

2 Answers2

77

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

John Petrone
  • 26,943
  • 6
  • 63
  • 68
  • 3
    It totally installed, but when I run it, it gives the error "Error opening terminal: cygwin." Any idea of that? I get into docker by launching git bash and then running "boot2docker ssh". – phazei Feb 26 '15 at 20:36
  • ok but how do you keep it from being deleted everytime you restart the host? – qodeninja Aug 16 '18 at 21:49
0

You can download the tar.gz package from nano website.

Javier Cortejoso
  • 8,851
  • 3
  • 26
  • 27