Public Repository

Last pushed: 2 months ago
Short Description
Short description is empty for this repo.
Full Description

Minimal Node.js Docker Images for Rulerr

Version v4.6.2
built on Alpine Linux.

This base image is based upon mhart/alpine-node but uses alpine as its base container.

Example Dockerfile for your own Node.js project

If you don't have any native dependencies, ie only depend on pure-JS npm
modules, then my suggestion is to run npm install locally before running
docker build (and make sure node_modules isn't in your .dockerignore) –
then you don't need an npm install step in your Dockerfile and you don't need
npm installed in your Docker image – so you can use one of the smaller
base* images.

FROM rulerr/alpine-node

WORKDIR /src
ADD . .

# If you have native dependencies, you'll need extra tools
# RUN apk add --no-cache make gcc g++ python

# If you need npm, don't use a base tag
# RUN npm install

EXPOSE 3000
CMD ["node", "index.js"]

Caveats

As Alpine Linux uses musl, you may run into some issues with environments
expecting glibc-like behavior – especially if you try to use binaries compiled
with glibc. You should recompile these binaries to use musl (compiling on
Alpine is probably the easiest way to do this).

Inspired by:

Docker Pull Command
Owner
rulerr