Node.js 26 (unofficial musl build), Corepack and git + shellcheck
106
Node.js with Corepack for Yarn Berry and pnpm on Alpine Linux, for JavaScript projects.
Docker Hub · Source · All images
| Base image | alpine:3.24.4 |
| Software | Node.js 26.13.1 (unofficial musl build, sha256 checked) with Corepack 0.36.0 |
| Also included | npm, Yarn (through Corepack), git, ShellCheck |
| User | node (uid 1000) with passwordless doas (doas apk add ...) |
| Tags | latest, 26.13.1, 26.13.1-YYYYMMDD |
Run in an empty directory; the commands work on the files of the current directory, mounted as the home directory of the container. CI runs these commands to check that they work.
# open the REPL of Node.js
docker run --rm -it aljazmc/node-alpine
# the versions of Node.js, npm and Corepack
docker run --rm aljazmc/node-alpine sh -c "node --version && npm --version && corepack --version"
# set up a Yarn Berry project in the current directory
docker run --rm -v .:/home/node -w /home/node aljazmc/node-alpine yarn init -2
## docker-compose.yml file
services:
node:
image: aljazmc/node-alpine
working_dir: /home/node
volumes:
- .:/home/node
environment:
HOME: /home/node
NODE_ENV: development
network_mode: host
## print node version
docker-compose run --rm node node -v
## set yarn version to berry
docker-compose run --rm node yarn set version berry
## initialize a new project
docker-compose run --rm node yarn init
## use shell inside the container to print environment variables
docker-compose run --rm node sh -c "printenv"
latest: the newest build.26.13.1: the Node version in the image, e.g. aljazmc/node-alpine:26.13.1. Use it to stay on a known version.26.13.1-YYYYMMDD: the same version, built on that date (UTC), e.g. 26.13.1-20261122. Every build gets its own tag that never moves, so use it where you need exactly the same image again.COREPACK_VERSION in the Dockerfile (npm install -g [email protected]). Node.js is pinned to 26.13.0 with NODE_VERSION.The Dockerfile, the scripts and this README are part of aljazmc/dockerfiles, released under the MIT License.
The software in the image keeps its own license:
| Software | License | In the image |
|---|---|---|
| Node.js | MIT | /usr/local/LICENSE |
Every other package keeps its license too: apk info --license <package> shows it on Alpine, /usr/share/doc/<package>/copyright on Debian.
Content type
Image
Digest
sha256:dc1ffda3f…
Size
78 MB
Last updated
1 day ago
docker pull aljazmc/node-alpine