Node.js docker image based on Alpine Linux.
2.7K
This Node.js docker image is based on Alpine. Alpine is based on Alpine Linux, lightweight Linux distribution based on BusyBox. The size of the image is very small, less than 50 MB!
Versions and are based on Node.js versions.
Here are the supported tags and respective Dockerfile links.
node-0.12.2, npm-3.5.0, latest (Dockerfile)This image is published in the Docker Hub. Simply run this command below to get it to your machine.
docker pull matriphe/alpine-nodejs:latest
Alternatively you can clone this repository and build the image using the docker build command.
This image use Asia/Jakarta timezone by default. You can change the timezone by change the TIMEZONE environment on Dockerfile and then build.
docker -t repository/imagename:tag Dockerfile
docker run matriphe/alpine-nodejs:latest
By default, it will run the node command. You can pass the Node or NPM command to this container. Here's the example.
docker run matriphe/alpine-nodejs:latest docker node --version
docker run matriphe/alpine-nodejs:latest npm --version
Add to your ~/.bashrc this line, so you can just type node or npm command from command line. Make sure the docker engine is running.
alias node='docker run --rm --name=node -v $(pwd):/www matriphe/alpine-nodejs:latest node'
alias npm='docker run --rm --name=npm -v $(pwd):/www matriphe/alpine-nodejs:latest npm'
And then execute this command to make alias working.
source ~/.bashrc
Now you can just simply type composer from command line.
Content type
Image
Digest
sha256:d0cf54b3c…
Size
11.1 MB
Last updated
almost 11 years ago
docker pull matriphe/alpine-node