Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ jobs:
./gradlew :core:nodejs18Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=$SHORT_COMMIT
./gradlew :core:nodejs20Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=nightly
./gradlew :core:nodejs20Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=$SHORT_COMMIT
./gradlew :core:nodejs24Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=nightly
./gradlew :core:nodejs24Action:distDocker -PdockerRegistry=docker.io -PdockerImagePrefix=openwhisk -PdockerImageTag=$SHORT_COMMIT
- name: Push Release Images
if: ${{ env.PUSH_RELEASE == 'true' }}
working-directory: runtime
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The following Node.js runtime versions (with kind & image labels) are generated

- Node.js 18 (`nodejs:18` & `openwhisk/action-nodejs-v18`)
- Node.js 20 (`nodejs:20` & `openwhisk/action-nodejs-v20`)
- Node.js 24 (`nodejs:24` & `openwhisk/action-nodejs-v24`)

This README documents the build, customisation and testing of these runtime images.

Expand Down
13 changes: 13 additions & 0 deletions core/nodejs24Action/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.*~
*.yaml
*.tmpl
*.gradle
.dockerignore
.project
.settings
build.xml
Dockerfile
logs
node_modules
package-lock.json
test.js
24 changes: 24 additions & 0 deletions core/nodejs24Action/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
-->

# NodeJS 24 OpenWhisk Runtime Container


Node.js version = [24.5.0](https://nodejs.org/en/blog/release/v24.5.0)
OpenWhisk version = [OpenWhisk v3.21.8](https://www.npmjs.com/package/openwhisk)
44 changes: 44 additions & 0 deletions core/nodejs24Action/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

FROM node:24-bullseye

# Initial update and some basics.
#
RUN apt-get update && apt-get install -y \
imagemagick \
graphicsmagick \
zip \
unzip \
&& rm -rf /var/lib/apt/lists/*

# Add sources and copy the package.json to root container,
# so npm packages from user functions take precedence.
#
WORKDIR /nodejsAction
ADD . /nodejsAction/
COPY package.json /

# Customize runtime with additional packages.
# Install package globally so user packages can override.
#
RUN cd / && npm install --no-package-lock --production \
&& npm cache clean --force

EXPOSE 8080

CMD node --expose-gc app.js
86 changes: 86 additions & 0 deletions core/nodejs24Action/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

apply plugin: 'eclipse'
eclipse {
project {
natures 'org.eclipse.wst.jsdt.core.jsNature'
buildCommand 'org.eclipse.wst.jsdt.core.javascriptValidator'
}
}

ext.dockerImageName = 'action-nodejs-v24'
apply from: '../../gradle/docker.gradle'

distDocker.dependsOn 'copyPackageJson'
distDocker.dependsOn 'copyProxy'
distDocker.dependsOn 'copyRunner'
distDocker.dependsOn 'copyService'
distDocker.dependsOn 'copyPlatform'
distDocker.dependsOn 'copyOpenWhisk'
distDocker.dependsOn 'copyKnative'
distDocker.dependsOn 'copyBuildTemplate'
distDocker.finalizedBy('cleanup')

task copyPackageJson(type: Copy) {
from '../nodejsActionBase/package.json'
into '.'
}

task copyProxy(type: Copy) {
from '../nodejsActionBase/app.js'
into '.'
}

task copyRunner(type: Copy) {
from '../nodejsActionBase/runner.js'
into '.'
}

task copyService(type: Copy) {
from '../nodejsActionBase/src/service.js'
into './src'
}

task copyPlatform(type: Copy) {
from '../nodejsActionBase/platform/platform.js'
into './platform'
}

task copyOpenWhisk(type: Copy) {
from '../nodejsActionBase/platform/openwhisk.js'
into './platform'
}

task copyKnative(type: Copy) {
from '../nodejsActionBase/platform/knative.js'
into './platform'
}

task copyBuildTemplate(type: Copy) {
from '../nodejsActionBase/buildtemplate.yaml'
into '.'
}

task cleanup(type: Delete) {
delete 'package.json'
delete 'app.js'
delete 'runner.js'
delete 'src'
delete 'platform'
delete 'buildtemplate.yaml'
}
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ include 'tests'
include 'core:nodejsActionBase'
include 'core:nodejs18Action'
include 'core:nodejs20Action'
include 'core:nodejs24Action'
include 'tests:dat:docker:nodejs18docker'
include 'tests:dat:docker:nodejs20docker'
include 'tests:dat:docker:nodejs24docker'

rootProject.name = 'runtime-nodejs'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package runtime.actionContainers

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner

@RunWith(classOf[JUnitRunner])
class NodeJs24ActionContainerTests extends NodeJsActionContainerTests {
override lazy val nodejsContainerImageName = "action-nodejs-v24"
override lazy val nodejsTestDockerImageName = "nodejs24docker"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package runtime.actionContainers

import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner

@RunWith(classOf[JUnitRunner])
class NodeJs24ConcurrentTests extends NodeJsConcurrentTests {
override lazy val nodejsContainerImageName = "action-nodejs-v24"
override lazy val nodejsTestDockerImageName = "nodejs24docker"
}
Loading