Public | Automated Build

Last pushed: 13 days ago
Short Description
Node.js / NPM on Alpine Linux using alpine: 3.6
Full Description

Node / NPM Docker Image on Alpine

This is a simple Node.js and NPM installation running on Alpine Linux. The following are the current tags I am creating. NOTE: the size in the badge from MicroBadger.com above is WRONG. Correct file sizes are listed below. However, you can still click on that link to see the correct layers.

I will bump these as Node versions change, but the older versions should remain in this repository. These images are base images, created to enhance my own workflow. You are more than welcome to use them, if you are interested.

The Node/NPM versions in the various tags are:

$ docker run --rm jkilbride/node-npm-alpine:8 node --version
v8.5.0

$ docker run --rm jkilbride/node-npm-alpine:8 npm --version
5.4.1

$ docker run --rm jkilbride/node-npm-alpine:8 yarn --version
1.0.1

$ docker run --rm jkilbride/node-npm-alpine:6 node --version
v6.11.3

$ docker run --rm jkilbride/node-npm-alpine:6 npm --version
3.10.10

$ docker run --rm jkilbride/node-npm-alpine:6 yarn --version
0.27.5

$ docker run --rm jkilbride/node-npm-alpine:4 node --version
v4.8.4

$ docker run --rm jkilbride/node-npm-alpine:4 npm --version
2.15.12

$ docker run --rm jkilbride/node-npm-alpine:4 yarn --version
0.27.5

To use an image in your own Dockerfiles, add it to your FROM statement:

FROM jkilbride/node-npm-alpine

FROM jkilbride/node-npm-alpine:8

FROM jkilbride/node-npm-alpine:6

FROM jkilbride/node-npm-alpine:4

etc...

I routinely login to my running containers to poke around. For convenience, I have added some shell aliases to /etc/profile.d/aliases.sh and enabled the /etc/profile.d/color_prompt.sh file. If you would like to have these customizations available when you login to a container, you must specify a login shell on the docker command line:

$ docker exec -it [your-container-name] /bin/sh -l

You can also enable the customizations from inside the container at any time by sourcing the /etc/profile file:

# . /etc/profile

Be aware that I prefer vi keybindings. If you prefer the default emacs keybindings, type set -o emacs at the command prompt.

Maintainer

Inspired by

License

The code is available under the MIT License.

Docker Pull Command
Owner
jkilbride
Source Repository

Comments (0)