Alpine is the base image which is based on Alpine Linux, a very compact Linux distribution. So, node:12.2.0-alpine is a Alpine Linux image with node 12.2.0 installed.

For the latest Alpine based image you can simply do node:alpine. If you want latest but not specifically Alpine you can do node:latest, that image will be based on stretch which is a Debian distribution.

You can find a full list of all supported tags here: https://hub.docker.com/_/node/

Answer from Ganhammar on Stack Overflow
🌐
Docker
hub.docker.com › _ › node
node - Official Image | Docker Hub
1 week ago - Unless you are working in an environment where only the node image will be deployed and you have space constraints, we highly recommend using the default image of this repository. View license information⁠ for Node.js or license information⁠ for the Node.js Docker project. As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
🌐
GitHub
github.com › nodejs › docker-node
GitHub - nodejs/docker-node: Official Docker Image for Node.js :turtle: · GitHub
March 14, 2026 - Using this image as a base, add the things you need in your own Dockerfile (see the alpine image description for examples of how to install packages if you are unfamiliar). To make the image size even smaller, you can bundle without npm/yarn. This image is based on version 11 of Debian, available in the debian official image. This image is based on version 12 of Debian, available in the debian official image.
Starred by 8.5K users
Forked by 2K users
Languages   Dockerfile 79.4% | Shell 14.3% | JavaScript 6.3%
🌐
Docker Hub
hub.docker.com › r › centos › nodejs-12-centos7
centos/nodejs-12-centos7 - Docker Image
This container image includes Node.JS 12 as a S2I⁠ base image for your Node.JS 12 applications. Users can choose between RHEL, CentOS and Fedora based images. The RHEL images are available in the Red Hat Container Catalog⁠, the CentOS images are available on Quay.io⁠, and the Fedora images are available in Fedora Registry⁠. The resulting image can be run using podman⁠. Note: while the examples in this README are calling podman, you can replace any such calls by docker with the same arguments
Top answer
1 of 3
25

Alpine is the base image which is based on Alpine Linux, a very compact Linux distribution. So, node:12.2.0-alpine is a Alpine Linux image with node 12.2.0 installed.

For the latest Alpine based image you can simply do node:alpine. If you want latest but not specifically Alpine you can do node:latest, that image will be based on stretch which is a Debian distribution.

You can find a full list of all supported tags here: https://hub.docker.com/_/node/

2 of 3
2

I know that alpine means a smaller container size, but I'm mainly concerned about what you're missing out on if you switch to alpine.

From this 2022 blog post 'Choosing the best Node.js Docker image'...

Good:

This will yield a Docker image size of 196MB, which shaves off 64MB from the slim Node.js images, and in the Alpine image tag — as of the day I’m writing this — there are only 17 operating system dependencies and zero security vulnerabilities were detected.

Bad:

  • However, it’s important to recognize that the Alpine project uses musl as the implementation for the C standard library, whereas Debian’s Node.js image tags such as bullseye or slim rely on the glibc implementation.
  • Choosing a Node.js alpine image tag means you are effectively choosing an unofficial Node.js runtime.
  • Unofficial-builds attempts to provide basic Node.js binaries for some platforms that are either not supported or only partially supported by Node.js. This project does not provide any guarantees and its results are not rigorously tested.

Some notable observations with Node.js alpine image tag compatibility are:

  • Yarn being incompatible (issue #1716).
  • If you require node-gyp for cross-compilation of native C bindings, then Python, which is a dependency of that process, isn’t available in the Alpine image and you will have to sort it out yourself (issue #1706).
🌐
GitHub
gist.github.com › grant › 7be5bfd82949b7797f947354d0d7028d
Run Node 12 Dockerfile · GitHub
Run Node 12 Dockerfile · Raw · Dockerfile · This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters ·
🌐
CircleCI
circleci.com › developer › images › image › cimg › node
cimg/node - CircleCI
A Node Docker image built to run on CircleCI that contains node and yarn
🌐
GitHub
github.com › mhart › alpine-node
GitHub - mhart/alpine-node: Minimal Node.js Docker Images built on Alpine Linux · GitHub
January 15, 2023 - $ docker run --rm mhart/alpine-node:14 node --version v14.17.3 $ docker run --rm mhart/alpine-node:12 node --version v12.22.3 $ docker run --rm mhart/alpine-node:14 npm --version 6.14.13 $ docker run --rm mhart/alpine-node:14 yarn --version 1.22.10 $ docker run --rm mhart/alpine-node:slim-14 node --version v14.17.3 $ docker run --rm mhart/alpine-node:slim-12 node --version v12.22.3 · If you're doing your npm install/npm ci or yarn install from your Dockerfile, then you'll probably want to add node_modules to your .dockerignore file first, so that it doesn't get sent to the docker daemon. For the smallest builds, use a multi-stage build – where you install your modules using the full install image, but then create your app using the slim image – this can reduce the size of your final image by ~35MB or so.
Starred by 2.4K users
Forked by 297 users
Languages   Dockerfile 92.2% | Shell 7.8%
🌐
Docker
hub.docker.com › layers › i386 › node › 12-alpine › images › sha256-215a9fbef4df2c1ceb7c79481d3cfd94ad8f1f0105bade39f3be907bf386c5e1
Image Layer Details - i386/node:12-alpine
Welcome to the world's largest container registry built for developers and open source contributors to find, use, and share their container images. Build, push and pull.
Find elsewhere
🌐
Red Hat
catalog.redhat.com › en › software › containers › ubi8 › nodejs-12 › 5d3fff015a13461f5fb8635a
Node.js 12 - Red Hat Ecosystem Catalog
April 26, 2022 - For all these three parts, users can either setup all manually and use commands nodejs and npm explicitly in the Dockerfile (3.1.), or users can use the Source-to-Image scripts inside the image (3.2.; see more about these scripts in the section "Source-to-Image framework and scripts" above), that already know how to set-up and run some common Node.js applications. FROM ubi8/nodejs-12 # Add application sources ADD app-src .
🌐
Docker Hub
hub.docker.com › r › mhart › alpine-node
mhart/alpine-node - Docker Image
# This stage installs our modules FROM mhart/alpine-node:12 WORKDIR /app COPY package.json package-lock.json ./ # If you have native dependencies, you'll need extra tools # RUN apk add --no-cache make gcc g++ python3 RUN npm ci --prod # Then we copy over the modules from above onto a `slim` image FROM mhart/alpine-node:slim-12 # If possible, run your container using `docker run --init` # Otherwise, you can use `tini`: # RUN apk add --no-cache tini # ENTRYPOINT ["/sbin/tini", "--"] WORKDIR /app COPY --from=0 /app .
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-build-a-node-js-application-with-docker
How To Build a Node.js Application with Docker | DigitalOcean
November 29, 2018 - A Docker Hub account. To create your image, you will first need to make your application files, which you can then copy to your container. These files will include your application’s static content, code, and dependencies. First, create a directory for your project in your non-root user’s ...
🌐
GitHub
github.com › vimc › node-docker
GitHub - vimc/node-docker: a Dockerfile and script for building an image that has both node-12 and docker installed
Contains a docker file for an image based on node-12 with docker installed, and script to build, tag and push the image to the vimc docker hub.
Forked by 2 users
Languages   Shell 55.4% | Dockerfile 44.6% | Shell 55.4% | Dockerfile 44.6%