Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: add CI rollout baseline
  • Loading branch information
ohmyfelix committed May 29, 2026
commit 8fd58f03a62d32a5502f800e64d0d9d3475521bf
81 changes: 60 additions & 21 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ permissions:
contents: read

jobs:
docker:
test:
name: Test (dockette/nodejs:${{ matrix.image }})
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -29,33 +30,14 @@ jobs:

fail-fast: false

name: Docker (dockette/nodejs:${{ matrix.image }})

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build docker image
uses: docker/build-push-action@v6
with:
context: ${{ matrix.image }}
push: false
tags: dockette/nodejs:${{ matrix.image }}
platforms: linux/amd64,linux/arm64

- name: Load docker image
- name: Build docker image for testing
uses: docker/build-push-action@v6
with:
context: ${{ matrix.image }}
Expand All @@ -72,10 +54,67 @@ jobs:
exit 255
fi

- name: Test npm version
run: docker run --rm dockette/nodejs:${{ matrix.image }} npm -v

build:
name: Build (dockette/nodejs:${{ matrix.image }})
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: v6
- image: v7
- image: v8
- image: v9
- image: v10
- image: v11
- image: v12
- image: v13
- image: v14
- image: v15
- image: v16
- image: v17
- image: v18

fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Push docker image
uses: docker/build-push-action@v6
with:
context: ${{ matrix.image }}
push: true
tags: dockette/nodejs:${{ matrix.image }}
platforms: linux/amd64,linux/arm64

docs:
name: Docs
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Update Docker Hub description
uses: peter-evans/dockerhub-description@v5
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: dockette/nodejs
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
DOCKER_IMAGE=dockette/nodejs
DEFAULT_VERSION=v18
VERSIONS=v6 v7 v8 v9 v10 v11 v12 v13 v14 v15 v16 v17 v18

.PHONY: build build-all test test-all run $(addprefix build-,$(VERSIONS)) $(addprefix test-,$(VERSIONS))

build: build-$(DEFAULT_VERSION)

build-all: $(addprefix build-,$(VERSIONS))

test: test-$(DEFAULT_VERSION)

test-all: $(addprefix test-,$(VERSIONS))

run:
docker run --rm -it ${DOCKER_IMAGE}:${DEFAULT_VERSION}

_docker-build-%: VERSION=$*
_docker-build-%:
Expand All @@ -9,6 +24,18 @@ _docker-build-%:
-t ${DOCKER_IMAGE}:${VERSION} \
./${VERSION}

_docker-test-%: VERSION=$*
_docker-test-%:
set -eu; \
node_version="$$(docker run --rm ${DOCKER_IMAGE}:${VERSION} node -v)"; \
case "$$node_version" in \
${VERSION}*) printf 'Node version matched %s\n' "$$node_version" ;; \
*) printf 'Invalid node version %s != ${VERSION}\n' "$$node_version"; exit 255 ;; \
esac; \
npm_version="$$(docker run --rm ${DOCKER_IMAGE}:${VERSION} npm -v)"; \
test -n "$$npm_version"; \
printf 'npm version %s\n' "$$npm_version"

build-v6: _docker-build-v6
build-v7: _docker-build-v7
build-v8: _docker-build-v8
Expand All @@ -22,3 +49,17 @@ build-v15: _docker-build-v15
build-v16: _docker-build-v16
build-v17: _docker-build-v17
build-v18: _docker-build-v18

test-v6: _docker-test-v6
test-v7: _docker-test-v7
test-v8: _docker-test-v8
test-v9: _docker-test-v9
test-v10: _docker-test-v10
test-v11: _docker-test-v11
test-v12: _docker-test-v12
test-v13: _docker-test-v13
test-v14: _docker-test-v14
test-v15: _docker-test-v15
test-v16: _docker-test-v16
test-v17: _docker-test-v17
test-v18: _docker-test-v18
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# NodeJS
<h1 align=center>Dockette / NodeJS</h1>

Ready-to-use images for NodeJS.
<p align=center>
<a href="https://github.com/dockette/nodejs/actions"><img src="https://github.com/dockette/nodejs/actions/workflows/docker.yml/badge.svg" alt="GitHub Actions"></a>
<a href="https://hub.docker.com/r/dockette/nodejs"><img src="https://img.shields.io/docker/pulls/dockette/nodejs.svg" alt="Docker Hub pulls"></a>
<a href="https://github.com/sponsors/f3l1x"><img src="https://img.shields.io/badge/sponsor-GitHub%20Sponsors-ea4aaa" alt="GitHub Sponsors"></a>
<a href="https://github.com/orgs/dockette/discussions"><img src="https://img.shields.io/badge/support-discussions-6f42c1" alt="Support/Discussions"></a>
</p>

-----

[![Docker Stars](https://img.shields.io/docker/stars/dockette/nodejs.svg?style=flat)](https://hub.docker.com/r/dockette/nodejs/)
[![Docker Pulls](https://img.shields.io/docker/pulls/dockette/nodejs.svg?style=flat)](https://hub.docker.com/r/dockette/nodejs/)

## Discussion / Help
<p align=center>
Ready-to-use images for NodeJS.
</p>

[![Join the chat](https://img.shields.io/gitter/room/dockette/dockette.svg?style=flat-square)](https://gitter.im/dockette/dockette?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-----

## Usage

Expand All @@ -29,5 +31,7 @@ Ready-to-use images for NodeJS.
| NodeJS 7 | Alpine v3.6 | v7 |
| NodeJS 6 | Alpine v3.6 | v6 |

These tags are kept for legacy projects. All published NodeJS versions in this repository are EOL upstream.

## Maintenance
See [how to contribute](https://github.com/dockette/.github/blob/master/CONTRIBUTING.md) to this package. Consider to [support](https://github.com/sponsors/f3l1x) **f3l1x**. Thank you for using this package.