Skip to content

feat(examples): Add httpserver-perl5.42-base-distroless example - #339

Open
danieldyn wants to merge 2 commits into
unikraft:mainfrom
danieldyn:feat/add-httpserver-perl5.42-base-distroless
Open

danieldyn wants to merge 2 commits into
unikraft:mainfrom
danieldyn:feat/add-httpserver-perl5.42-base-distroless

Conversation

@danieldyn

Copy link
Copy Markdown

Description

Added a Perl5.42 HTTP server example using the distroless container image gcr.io/distroless/cc-debian13, which is compatible with trixie 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-linux-x86-64
  • The libraries libc, libm and libperl

The remaining dependencies related to perl and libcrypt still need to be manually copied on top of that (see Dockerfile).

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 85MB)
  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

Use cc-debian13 distroless image for full compatibility
with trixie build. It also includes libm, libc, libperl
and standard dynamic linkers.

Additionally, use SHA digest for distroless image.

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