Skip to content

feat(examples): Add Prisma Expressjs4.18 Node21 base distroless - #356

Open
CKCatalin wants to merge 2 commits into
unikraft:mainfrom
CKCatalin:feat/add-prisma-expressjs4.18-node21-base-distroless
Open

CKCatalin wants to merge 2 commits into
unikraft:mainfrom
CKCatalin:feat/add-prisma-expressjs4.18-node21-base-distroless

Conversation

@CKCatalin

Copy link
Copy Markdown

Description

Added a Node.js (Express 4.18) and Prisma base example using the distroless container image cgr.dev/chainguard/node, which provides a minimal runtime environment. This example utilizes a multi-stage build, starting with node:22-bookworm-slim to install dependencies, generate the Prisma client, migrate and seed the database, and bundle the application using Webpack. It selectively copies the compiled application bundle into the final distroless image.

The README.md file contains instructions for building and running the example manually.

Automated Testing

This PR contains a three-stage workflow to build and test this example via GitHub Actions:

  1. Measuring the rootfs size (resulting in 189MB)
  2. Scanning for vulnerabilities using Trivy
  3. Validating the web application operations using curl on the /feed endpoint and matching the HTTP 200 status code

Note on Vulnerability Scanning:

Trivy scans are configured to pass by explicitly ignoring specific vulnerabilities via .trivyignore. CVE-2026-14456 (libssl3) is ignored because it affects OpenSSL QUIC servers, a feature that this simple application does not implement or utilize (exception expires on 2026-11-30).

Use the cgr.dev/chainguard/node distroless image for a minimal execution environment. Configure Webpack and Prisma to bundle the debian-openssl-3.0.x query engine. Update README with memory allocation requirements for Unikraft compatibility.

Signed-off-by: Constantin-Cătălin Cojocaru <catalincojocaru4@gmail.com>
…ress server example

- Measure root file system size using du -sh
- Scan for vulnerabilities using Trivy
- Validate output using curl and grep

Signed-off-by: Constantin-Cătălin Cojocaru <catalincojocaru4@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant