

# fix npm - not the latest version installed by apt-get
NPM INSTALL LATEST VERSION OF A PACKAGE UPDATE
# update and install all required packages (no sudo required as root)Īpt-get update -yq & apt-get upgrade -yq & \Īpt-get install -yq nodejs build-essential Sudo docker run -i -t ubuntu /bin/bash # drops you into container as root After installation testing, I chose version 2 for my laptop. I then executed each version of code within a container. To test this code, I created three separate Docker containers, based on the official 14.04 Ubuntu base image, located on Docker Hub. I often create a Docker container or VirtualBox VM, to install and test new scripts, before running them within our software environments. Dockerĭocker containers and virtual machines (VM) are ideal platforms for developing and testing applications, locally. It appears not to be recommended with the latest versions of npm. *There is some debate on the use of ‘sudo’ with some earlier versions of npm.

Recently, I was setting up a new development laptop with Ubuntu 14.10 (Utopic Unicorn). Easily update both applications to the latest versions. Install the latest versions of Node.js and npm, into a Docker container, with or without the need for root access.
