Skip to content

feat(deploy): in-container build Dockerfiles — build the image without a host JDK #674

Description

@devops-thiago

Problem Statement

Building the container today requires a host toolchain (JDK 21+, Maven, and GraalVM for the native image) before docker build can run. For the self-hosting audience — the project's core audience — that's real onboarding friction: "install Java to build the Docker image" defeats part of the point of shipping a container.

Proposed Solution

Add multi-stage, in-container build Dockerfiles so docker build is the only prerequisite:

  • Dockerfile.jvm-build — stage 1 builds with a Maven+JDK image, stage 2 is the existing runtime layout.
  • Dockerfile.native-build — stage 1 builds the native image with a Mandrel/GraalVM builder image, stage 2 the existing micro base.
  • Layer-cache the Maven repository (--mount=type=cache) so rebuilds are fast.
  • Document both in the README quickstart as the zero-toolchain path; keep the current host-build Dockerfiles for CI/dev speed.
  • CI builds the in-container variants at least on release tags so they can't rot.

Pairs with #318 (try-before-self-host onboarding): both lower the "first successful deploy" bar.

Alternatives Considered

  • Publish pre-built images only — necessary but not sufficient; self-hosters patching or pinning forks still need a no-toolchain build path.
  • Devcontainer — helps contributors, not deployers.

Priority

Nice to have

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions