Node Alpine base image bundled with Sharp (linux-musl) and font support using libvips and DejaVu.
1.0K
Node.js Alpine images with Sharp and the required image-processing, font-rendering, and text-layout dependencies.
| Node.js Version | Image |
|---|---|
18 | catbee/node:18 |
20 | catbee/node:20 |
22 | catbee/node:22 |
24 | catbee/node:24 |
26 | catbee/node:26 |
All versions are based on the corresponding official Node.js Alpine image.
Run the latest available version:
docker run -it --rm catbee/node:26
Run a specific Node.js version:
docker run -it --rm catbee/node:24
docker run -it --rm catbee/node:22
docker run -it --rm catbee/node:20
docker run -it --rm catbee/node:18
docker run --rm catbee/node:26 node --version
Example:
v26.x.x
Sharp is installed globally in the image and can be loaded directly from Node.js:
docker run --rm catbee/node:26 \
node -e "console.log(require('sharp').versions)"
The image includes the following system packages:
| Package | Purpose |
|---|---|
vips | Core image processing library used by Sharp |
fontconfig | Font discovery and configuration |
freetype | Font rendering |
ttf-dejavu | TrueType fonts for image and text rendering |
pango | Text layout and rendering |
These dependencies are particularly useful for applications that generate or process images containing text, SVGs, and custom fonts.
Example:
const sharp = require('sharp');
sharp('input.jpg')
.resize(800)
.jpeg()
.toFile('output.jpg')
.then(() => {
console.log('Image processed successfully');
});
Example Dockerfile:
FROM catbee/node:26
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
CMD ["node", "index.js"]
Build the application:
docker build -t my-node-app .
Run it:
docker run --rm my-node-app
Use the Node.js major version that matches your application:
catbee/node:18
catbee/node:20
catbee/node:22
catbee/node:24
catbee/node:26
For example:
docker pull catbee/node:26
Each image uses the corresponding official Node.js Alpine base image:
node:18-alpine
node:20-alpine
node:22-alpine
node:24-alpine
node:26-alpine
The image uses:
WORKDIR /app
The default command is:
node
Therefore:
docker run -it --rm catbee/node:26
starts the Node.js runtime.
Commands can also be passed directly:
docker run --rm catbee/node:26 node --version
Sharp is installed during image creation with optional dependencies enabled:
npm install sharp --include=optional
npm rebuild sharp
This allows Sharp to be installed and rebuilt against the Alpine environment.
| Property | Value |
|---|---|
| Runtime | Node.js |
| Base | Alpine Linux |
| Sharp | Pre-installed |
| Image processing | libvips |
| Font rendering | FreeType |
| Font discovery | Fontconfig |
| Text rendering | Pango |
| Included fonts | DejaVu |
| Working directory | /app |
| Default command | node |
Node.js 26:
docker pull catbee/node:26
Node.js 24:
docker pull catbee/node:24
Node.js 22:
docker pull catbee/node:22
Node.js 20:
docker pull catbee/node:20
Node.js 18:
docker pull catbee/node:18
This image contains software distributed under the licenses of Node.js, Sharp, libvips, and the included Alpine Linux packages.
Refer to the respective upstream projects for complete licensing information.
Content type
Image
Digest
sha256:fe825de37…
Size
109.1 MB
Last updated
about 17 hours ago
docker pull catbee/node:26