Sign inSign up

matriphe/alpine-node

By matriphe

•Updated almost 11 years ago

Node.js docker image based on Alpine Linux.

Image
1

2.7K

matriphe/alpine-node repository overview

⁠Alpine Node

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!

⁠Tags

Versions and are based on Node.js versions.

Here are the supported tags and respective Dockerfile links.

⁠Getting The Image

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.

⁠Build

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

⁠Run The Container

⁠Create and Run The Container
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
⁠Create an alias

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.

Tag summary

Content type

Image

Digest

sha256:d0cf54b3c…

Size

11.1 MB

Last updated

almost 11 years ago

docker pull matriphe/alpine-node