Which jdk docker image we should use for pubsub enrich with jar file provided by snowplow

Previously, we were successfully using the openjdk:18-alpine Docker image along with the pubsub enrich 2.0.5 JAR file. However, when attempting to redeploy with the same image, an error emerged: "com.snowplowanalytics.snowplow.enrich.common.enrichments.registry.JavascriptScriptEnrichment.engine()" is null.

Upon investigating the issue further, we discovered that this error is related to Snowplow’s JavaScript enrichment, which relies on the Nashorn JavaScript engine. Since Nashorn was deprecated in JDK 11 and entirely removed in JDK 15, any OpenJDK version beyond 15, including OpenJDK 18, no longer includes the Nashorn engine.

As a solution, we tested deploying with the jdk11 Docker image, which proved to be successful. Therefore, it became necessary to downgrade our setup to use the jdk11 image in order to support the required functionality.

Moving forward, we need guidance on selecting the appropriate Docker image for running the pubsub enrich process with the Snowplow JAR file. Considering the Nashorn engine’s removal, we seek a compatible Docker image that allows us to continue using Snowplow’s JavaScript enrichment functionality without encountering the Nashorn-related issues.

Hi @Jitender_Attri Snowplow Enrich is bundled using this common release plugin which leverages two different base Docker images for our builds - elipse-temurin:11-jre-focal and gcr.io/distroless/base:nonroot.

Ultimately though they both use JDK 11.

We also publish up-to-date containers directly to DockerHub using both of these base images (that you can use directly in your Snowplow pipeline deployment).


All that being said our recommendation is always to use the official containers we have published - can I ask what the need is to handle this bundling process yourself?