A minimal install of nodejs used to run npm
commands.
Pull the latest version from the Docker registry:
$ docker pull coroin/npm
To build the image from source:
$ git clone https://github.com/coroin/npm.git
$ cd npm
$ docker build -t coroin/npm .
The following examples run npm
commands against a laravel application (presumably running in a separate Docker container such as coroin/app):
Install packages:
$ docker run --rm -w /var/www/html coroin/npm install
Compile assets for production:
$ docker run --rm -w /var/www/html coroin/npm run production