Use nano in Docker containers

If for some reason you find yourself needing to use nano in a Docker container, you can set the terminal type and then you’ll be able to use it. Say for example you ran bash with the exec command, you can then run:

and it’ll allow you to use the terminal as normal for nano/clear etc.

Making Local Development Faster with Caches for NPM & Composer (Part One: NPM)

This is the first post in a two part series detailing how you can use Docker to run local caches of both remote NPM resources and composer packages.

After the image has been pulled down, you can run it and map to a port using the following syntax:

This will run sinopia and bind the external interface to port 81. There is a fair few configuration options that you can specify, I’d recommend getting a copy of the configuration file then mounting that as a volume.

Next, at the top of the screen, it’ll give you the two commands to make your client version of NPM connect to your new shiny cache, it’ll be something similar to:

Screenshot 2016-03-02 11.42.51

If you run those two commands, it’ll set your client to use your new cache and you’re good to go.

The following links are useful reference for this post:

Docker + rtorrent = Docktorrent

I download a lot of linux images, by far the quickest way is via torrent. Recently discovered a nice implementation of rtorrent in a Docker image, via docktorrent, simple enough to run:

The 31405 is the public facing port for the web interface, make sure that you forward both 9527 and 45566 as it’ll need those to run.