Skip to content

Add GraalVM native image support with Dockerfile and updated Docker CI workflow#9

Closed
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1775684380-graalvm-setup
Closed

Add GraalVM native image support with Dockerfile and updated Docker CI workflow#9
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1775684380-graalvm-setup

Conversation

@devin-ai-integration

Copy link
Copy Markdown

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 24 native-image compilation → minimal Ubuntu 24.10 runtime. Environment variables and entrypoint arguments are carried over from the existing Dockerfile.

.github/workflows/docker-image.yml — Updated to build both default and GraalVM Docker images on release. GraalVM image tagged graalvm + latest. Also added workflow_dispatch trigger. The default JVM image is now tagged only with the release version (no longer latest).

Review & Testing Checklist for Human

  • AWT / ImageIO compatibility with GraalVM native image: This project uses BufferedImage, imgscalr, and ImageIO for 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 of Dockerfile-GraalVM is strongly recommended — the native-image step may fail or produce a binary that crashes at runtime on image operations.
  • latest tag moved from JVM to GraalVM: The previous workflow tagged the JVM image as latest. Now only the GraalVM image gets latest. If any deployment pulls wilddev/images:latest expecting a JVM-based image, this is a breaking change.
  • EXTRA_ARGS not declared as ENV: The entrypoint references $EXTRA_ARGS but no ENV EXTRA_ARGS='' is set (consistent with geo's GraalVM Dockerfile, but differs from this repo's existing Dockerfile which declares it). Verify this doesn't cause issues when the variable is unset.
  • JAVA_OPTS default 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) the native-image compilation succeeds, and (2) the resulting binary can start up and process an image upload against a local MongoDB/RabbitMQ stack.

Notes

  • No AOT runtime hints were added. The geo project required extensive Caffeine reflection hints; this project may need hints for AWT, ImageIO, and imgscalr.
  • ubuntu:24.10 is used as the runtime base (non-LTS, consistent with geo).
  • The maven.yml workflow was not modified.

Link to Devin session: https://app.devin.ai/sessions/90a2213da9af472db1175be1b03d5b5d
Requested by: @WildDev

…I workflow

Co-Authored-By: Georgii Glinskiy <georgy@wilddev.email>
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@WildDev WildDev closed this Apr 9, 2026
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