HUB
Sign inSign up

aljazmc/node-alpine

By aljazmc

•Updated 1 day ago

Node.js 26 (unofficial musl build), Corepack and git + shellcheck

Image
Integration & delivery
Developer tools
0

106

aljazmc/node-alpine repository overview

⁠aljazmc/node-alpine

Node.js with Corepack for Yarn Berry and pnpm on Alpine Linux, for JavaScript projects.

Docker pulls Image size Version platforms: amd64 | arm64 Alpine: 3.24.4 Node.js: 26.13.1 Node.js license: MIT CI Dockerfile license: MIT

Docker Hub⁠ · Source⁠ · All images⁠

⁠Overview

Base imagealpine:3.24.4
SoftwareNode.js 26.13.1 (unofficial musl build, sha256 checked) with Corepack 0.36.0
Also includednpm, Yarn (through Corepack), git, ShellCheck
Usernode (uid 1000) with passwordless doas (doas apk add ...)
Tagslatest, 26.13.1, 26.13.1-YYYYMMDD

⁠Quick start

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

⁠Usage with Docker Compose

## 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"

⁠Notes

  • Not intended for production use.

⁠Tags

  • 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 is pinned with COREPACK_VERSION in the Dockerfile (npm install -g [email protected]). Node.js is pinned to 26.13.0 with NODE_VERSION.

⁠License

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:

SoftwareLicenseIn 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.

Tag summary

Content type

Image

Digest

sha256:dc1ffda3f…

Size

78 MB

Last updated

1 day ago

docker pull aljazmc/node-alpine