Add GraalVM native image support with Dockerfile and updated Docker CI workflow#9
Closed
devin-ai-integration[bot] wants to merge 1 commit into
Closed
Add GraalVM native image support with Dockerfile and updated Docker CI workflow#9devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…I workflow Co-Authored-By: Georgii Glinskiy <georgy@wilddev.email>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds GraalVM native image support for the images service, following the same multi-stage build pattern as geo.
Dockerfile-GraalVM— 3-stage build: Maven package (-P native) → GraalVM 24native-imagecompilation → minimal Ubuntu 24.10 runtime. Environment variables and entrypoint arguments are carried over from the existingDockerfile..github/workflows/docker-image.yml— Updated to build both default and GraalVM Docker images on release. GraalVM image taggedgraalvm+latest. Also addedworkflow_dispatchtrigger. The default JVM image is now tagged only with the release version (no longerlatest).Review & Testing Checklist for Human
BufferedImage,imgscalr, andImageIOfor image processing. AWT classes are notoriously problematic in GraalVM native images and typically require additional flags (e.g.-H:+UnlockExperimentalVMOptions,-H:+AddAllCharsets) or AOT resource/reflection hints. A test build ofDockerfile-GraalVMis strongly recommended — the native-image step may fail or produce a binary that crashes at runtime on image operations.latesttag moved from JVM to GraalVM: The previous workflow tagged the JVM image aslatest. Now only the GraalVM image getslatest. If any deployment pullswilddev/images:latestexpecting a JVM-based image, this is a breaking change.EXTRA_ARGSnot declared as ENV: The entrypoint references$EXTRA_ARGSbut noENV EXTRA_ARGS=''is set (consistent with geo's GraalVM Dockerfile, but differs from this repo's existingDockerfilewhich declares it). Verify this doesn't cause issues when the variable is unset.JAVA_OPTSdefault changed: Existing Dockerfile uses-Xmx512M; the GraalVM version uses'-Xms32M -Xmx512M'. These are passed as bare CLI args to the native binary — confirm these flags are recognized or silently ignored by the GraalVM native executable.Recommended test plan: Build the GraalVM image locally with
docker build -f Dockerfile-GraalVM .and verify (1) thenative-imagecompilation succeeds, and (2) the resulting binary can start up and process an image upload against a local MongoDB/RabbitMQ stack.Notes
ubuntu:24.10is used as the runtime base (non-LTS, consistent with geo).maven.ymlworkflow was not modified.Link to Devin session: https://app.devin.ai/sessions/90a2213da9af472db1175be1b03d5b5d
Requested by: @WildDev