Skip to content

Distroless builds - httpserver-java17-springboot-distroless - #456

Open
Teodorandrei22 wants to merge 1 commit into
unikraft-cloud:mainfrom
Teodorandrei22:feat/httpserver-java17-springboot-distroless
Open

Teodorandrei22 wants to merge 1 commit into
unikraft-cloud:mainfrom
Teodorandrei22:feat/httpserver-java17-springboot-distroless

Conversation

@Teodorandrei22

Copy link
Copy Markdown
Contributor

-Add distroless variant of httpserver-java17-springboot example.
-Use gcr.io/distroless/java17-debian13 as runtime base.
-Add Dockerfile, Kraftfile, README, and test file.

@Teodorandrei22
Teodorandrei22 force-pushed the feat/httpserver-java17-springboot-distroless branch from 13979c9 to b285633 Compare August 29, 2026 14:56
@razvand
razvand requested a lite review from Copilot September 17, 2026 19:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃煛 Changes recommended

The new distroless variant includes a few user-facing correctness issues (doc/test references and README output mismatch) and a small API behavior inconsistency that should be fixed before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds a distroless runtime variant of the existing Java 17 Spring Boot HTTP server example, intended to simplify the runtime filesystem by using gcr.io/distroless/java17-debian13.

Changes:

  • Introduces a new httpserver-java17-springboot-distroless example with Dockerfile + Kraftfile setup.
  • Adds a README describing build/deploy steps and customization points for the distroless variant.
  • Adds an end-to-end test for the new example.
File summaries
File Description
httpserver-java17-springboot-distroless/Dockerfile Adds multi-stage build using Debian build stage and distroless Java 17 runtime stage.
httpserver-java17-springboot-distroless/Kraftfile Defines Unikraft Cloud runtime/target/rootfs and the Java command to start the app.
httpserver-java17-springboot-distroless/README.md Documents how to build, deploy, validate, and customize the distroless variant.
httpserver-java17-springboot-distroless/DemoApplication.java Spring Boot controller exposing /hello.
httpserver-java17-springboot-distroless/test_httpserver-java17-springboot-distroless.py E2E test that deploys the image and validates the /hello endpoint response.
Review details

Suppressed comments (1)

httpserver-java17-springboot-distroless/test_httpserver-java17-springboot-distroless.py:7

  • In the docstring's step list, the image name in the build command uses the non-distroless example name; this should match the distroless variant to avoid copy/paste mistakes.
1. ``unikraft build . --output <prefix>/httpserver-java17-springboot:<tag>``
2. ``unikraft run --metro <metro> -p 443:8080/tls+http -m 1G --image ...``
3. ``curl https://<instance-url>/hello`` and assert "Hello, World!".
  • Files reviewed: 5/5 changed files
  • Comments generated: 4
  • Review effort level: Lite

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread httpserver-java17-springboot-distroless/DemoApplication.java
Comment thread httpserver-java17-springboot-distroless/Dockerfile
Comment thread httpserver-java17-springboot-distroless/README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃煛 Changes recommended

The new Dockerfile invokes unzip without installing it, which is likely to break the example build in CI and for users.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread httpserver-java17-springboot-distroless/Dockerfile
Add distroless variant of httpserver-java17-springboot example.
Use gcr.io/distroless/java17-debian13 as runtime base.
Add Dockerfile, Kraftfile, README, and test file.
Signed-off-by: Teodor Constantinescu <constantinescu.teodor22@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃數 Needs a closer look

It introduces a new example with a distroless runtime base and runtime command assumptions that should be validated by a human via CI/runtime verification before approval.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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.

2 participants