diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 511ae46..8b62166 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,13 +16,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - base-image-tag: [20-bookworm, 22-bookworm, 24-bookworm] + base-image-tag: [20-bookworm, 22-bookworm, 24-bookworm, 26-trixie] steps: - uses: actions/checkout@master - name: Determine Java version id: java_version run: | - echo 'version=17' >> $GITHUB_OUTPUT + if [[ "${{ matrix.base-image-tag }}" == *trixie* ]]; then + echo 'version=21' >> $GITHUB_OUTPUT + else + echo 'version=17' >> $GITHUB_OUTPUT + fi - name: Test run: | chmod +x runTests.sh && ./runTests.sh ${{ matrix.base-image-tag }} ${{ steps.java_version.outputs.version }} @@ -30,7 +34,7 @@ jobs: run: | docker build --build-arg=BASE_IMAGE_TAG=${{ matrix.base-image-tag }} --build-arg=JAVA_VERSION=${{ steps.java_version.outputs.version }} --tag ppiper/node-browsers:${{ matrix.base-image-tag }} . - name: Tag latest image - if: ${{ matrix.base-image-tag == '24-bookworm' }} + if: ${{ matrix.base-image-tag == '26-trixie' }} run: | docker tag ppiper/node-browsers:${{ matrix.base-image-tag }} ppiper/node-browsers:latest - name: Push @@ -38,7 +42,7 @@ jobs: run: | echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USER }} --password-stdin docker push ppiper/node-browsers:${{ matrix.base-image-tag }} - if [ "${{ matrix.base-image-tag }}" == 24-bookworm ]; then + if [ "${{ matrix.base-image-tag }}" == 26-trixie ]; then docker push ppiper/node-browsers:latest fi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8a918c..dd87cc5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,13 +12,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - base-image-tag: [20-bookworm, 22-bookworm, 24-bookworm] + base-image-tag: [20-bookworm, 22-bookworm, 24-bookworm, 26-trixie] steps: - uses: actions/checkout@v3 - name: Determine Java version id: java_version run: | - echo 'version=17' >> $GITHUB_OUTPUT + if [[ "${{ matrix.base-image-tag }}" == *trixie* ]]; then + echo 'version=21' >> $GITHUB_OUTPUT + else + echo 'version=17' >> $GITHUB_OUTPUT + fi - name: Test run: | chmod +x runTests.sh && ./runTests.sh ${{ matrix.base-image-tag }} ${{ steps.java_version.outputs.version }} @@ -41,13 +45,13 @@ jobs: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USER }} --password-stdin docker build --build-arg=BASE_IMAGE_TAG=${{ matrix.base-image-tag }} --build-arg=JAVA_VERSION=${{ steps.java_version.outputs.version }} --tag ppiper/node-browsers:${{ env.PIPER_version }}-${{ matrix.base-image-tag }} . docker push ppiper/node-browsers:${{ env.PIPER_version }}-${{ matrix.base-image-tag }} - - name: Tag and push node 24 image - if: ${{ matrix.base-image-tag == '24-bookworm' }} + - name: Tag and push node 26 image + if: ${{ matrix.base-image-tag == '26-trixie' }} run: | docker tag ppiper/node-browsers:${{ env.PIPER_version }}-${{ matrix.base-image-tag }} ppiper/node-browsers:${{ env.PIPER_version }} docker push ppiper/node-browsers:${{ env.PIPER_version }} - uses: SAP/project-piper-action@master - if: ${{ matrix.base-image-tag == '24-bookworm' }} + if: ${{ matrix.base-image-tag == '26-trixie' }} with: piper-version: latest command: githubPublishRelease diff --git a/Dockerfile b/Dockerfile index 28c7ef0..eeee0f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,10 @@ FROM node:$BASE_IMAGE_TAG ARG JAVA_VERSION -RUN apt-get update && \ - apt-get install -y chromium firefox-esr xvfb libxi6 libgbm1 libgconf-2-4 openjdk-"${JAVA_VERSION}"-jre && \ +RUN DEBIAN_VERSION=$(. /etc/os-release && echo "$VERSION_CODENAME") && \ + if [ "$DEBIAN_VERSION" != "trixie" ]; then EXTRAS="libgconf-2-4"; fi && \ + apt-get update && \ + apt-get install -y chromium firefox-esr xvfb libxi6 libgbm1 $EXTRAS openjdk-"${JAVA_VERSION}"-jre && \ rm -rf /var/lib/apt/lists/* /var/cache/apt/* && \ ln -s /usr/bin/chromium /usr/bin/google-chrome diff --git a/README.md b/README.md index 458cdf8..5ede879 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This image is published to Docker Hub and can be pulled via the command docker pull ppiper/node-browsers ``` -The default tag `latest` contains Node 24. +The default tag `latest` contains Node 26. For specific Node versions, use the following tags: @@ -32,17 +32,20 @@ For specific Node versions, use the following tags: docker pull ppiper/node-browsers:20-bookworm docker pull ppiper/node-browsers:22-bookworm docker pull ppiper/node-browsers:24-bookworm +docker pull ppiper/node-browsers:26-trixie ``` +> **⚠️ Note:** The `26-trixie` image is based on Debian Trixie (13) which ships Java 21 by default instead of Java 17 (Bookworm). Please ensure your project is compatible with Java 21. + ## Build To build this image locally, open a terminal in the directory of the Dockerfile and run ``` -docker build --build-arg=BASE_IMAGE_TAG=24-bookworm -t ppiper/node-browsers . +docker build --build-arg=BASE_IMAGE_TAG=26-trixie -t ppiper/node-browsers . ``` -Where the `BASE_IMAGE_TAG` can be set to `20-bookworm`, `22-bookworm`, or `24-bookworm`. +Where the `BASE_IMAGE_TAG` can be set to `20-bookworm`, `22-bookworm`, `24-bookworm`, or `26-trixie`. The given tag **must** exist in the [node](https://hub.docker.com/_/node) base image **and** use Debian GNU/Linux. ## Usage