Skip to content

feat(examples): Add prisma-expressjs4.18-node22-base-distroless example - #340

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

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

Conversation

@danieldyn

Copy link
Copy Markdown

Description

Added an Express.js4.18 Node 22 Prisma server example using the distroless container image cgr.dev/chainguard/node, which is compatible with bookworm-slim and provides sufficient dependencies. This example is based on the existing one in the catalog, enhancing the container build via distroless.

The README.md file contains instructions for building and running the example manually, as well as the list of dependencies that are covered by the chosen distroless image:

• CA certificates (ca-certificates)
• Timezone data (tzdata)
• Standard /tmp and /etc directories
• The dynamic linker ld-musl-x86-64
• The libraries libssl, libcrypto, libgcc_s and libstdc++

Automated Testing

The second commit of 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 (one found, but not relevant, see .trivyignore for more)
  3. Running in the background and testing connectivity using curl

…ample

Use chainguard/node distroless image for full compatibility
with bookworm-slim build. It also includes libssl, libcrypto,
libgcc_s, libstdc++ and standard dynamic linkers.

Additionally, use SHA digest for distroless image.

Signed-off-by: Daniel-Ioan Dinu <daniel_dinu30@yahoo.com>
… Node22 server example

- Measure root file system size using du -h
- Scan for vulnerabilities using Trivy
- Run in background and test connectivity using curl

Additionally, document one unresolved CVE to .trivyignore.

Signed-off-by: Daniel-Ioan Dinu <daniel_dinu30@yahoo.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