Skip to content
seqeralabsPublic

About

Seqera JDK base image

Resources

Stars

0 stars

Watchers

7 watching

Forks

Repository files navigation

nf-jdk

Multi-architecture Java JDK containers optimized with different memory allocators for backend execution in the Seqera ecosystem.

Container Variants

This project builds two types of Java containers, each optimized for different use cases:

🏗️ Base Container

  • Image: nf-jdk:corretto-{version}
  • Architecture: AMD64, ARM64
  • Memory Allocator: System default
  • Use Case: Standard Java applications

⚡ Jemalloc Container

  • Image: nf-jdk:corretto-{version}-jemalloc
  • Architecture: AMD64, ARM64
  • Memory Allocator: jemalloc 5.2.1 (Amazon Linux 2023 package)
  • Use Case: High-performance applications with intensive memory allocation

Architecture Support Matrix

Variant AMD64 ARM64 Notes
Base ✅ ✅ Standard Java runtime
Jemalloc ✅ ✅ Multi-arch via AL2023 package

Available Versions

All container variants are built for multiple Java versions:

  • Java 17: 17-al2023 (Amazon Linux 2023)
  • Java 21: 21-al2023 (Amazon Linux 2023)
  • Java 25: 25-al2023 (Amazon Linux 2023)

Registry

Images are published to Seqera Labs' container registry:

  • Registry: public.cr.seqera.io
  • Repository: seqeralabs/nf-jdk

Deprecated: the legacy repository public.cr.seqera.io/nf-jdk (registry root) is still published as a mirror with identical tags and digests, but it will be removed in the future. Please migrate to public.cr.seqera.io/seqeralabs/nf-jdk.

Usage Examples

# Pull base containers
docker pull public.cr.seqera.io/seqeralabs/nf-jdk:corretto-25-al2023
docker pull public.cr.seqera.io/seqeralabs/nf-jdk:corretto-21-al2023
docker pull public.cr.seqera.io/seqeralabs/nf-jdk:corretto-17-al2023

# Pull jemalloc-optimized containers (multi-architecture)
docker pull public.cr.seqera.io/seqeralabs/nf-jdk:corretto-25-al2023-jemalloc
docker pull public.cr.seqera.io/seqeralabs/nf-jdk:corretto-21-al2023-jemalloc
docker pull public.cr.seqera.io/seqeralabs/nf-jdk:corretto-17-al2023-jemalloc

Jemalloc Multi-Architecture Support

Amazon Linux 2023 Package Approach

This project uses the Amazon Linux 2023 jemalloc package instead of custom compilation, which provides several benefits:

✅ Native ARM64 Compatibility

  • AWS has configured jemalloc with appropriate page size settings for ARM64
  • Optimized for Graviton processors with proper page size handling
  • No custom compilation or cross-platform compatibility issues

✅ Simplified Build Process

  • Uses standard package manager installation (yum install jemalloc)
  • Eliminates complex binary compilation and artifact management
  • Reduced build time and fewer potential failure points

✅ Security and Maintenance

  • Officially maintained and regularly updated by AWS
  • Security patches automatically included in package updates
  • Consistent with Amazon Linux 2023 ecosystem optimizations

ARM64 Page Size Compatibility

Jemalloc may have compatibility issues with ARM64 systems that use different page sizes, particularly:

However, Amazon Linux 2023 uses 4K page size (AWS documentation), which is compatible with jemalloc's default configuration, ensuring reliable operation across all AWS Graviton instances.

Build System

Automated Builds

The project uses a unified GitHub Actions workflow that:

  • Schedule: Runs daily at 1:00 AM UTC
  • Manual Trigger: Available via workflow_dispatch
  • No Push Builds: Removed for cleaner development workflow
  • Matrix Strategy: Version list comes from the Makefile (make print-versions); builds 6 containers per run (3 versions × 2 variants) with the current default versions.

Build Architecture

  1. Single source of truth: Versions and base image digests are defined in the Makefile; generic Dockerfile and Dockerfile_jemalloc use ARG BASE_IMAGE passed at build time.
  2. Package Installation: Jemalloc uses Amazon Linux 2023 package manager
  3. Container Building: Multi-architecture container builds with optimized layers
  4. Automatic Publishing: Images pushed to registry during build process

Manual Builds

# Trigger build workflow manually
gh workflow run build.yml

# Check workflow status  
gh run list --workflow=build.yml --limit=5

# Monitor specific run
gh run view <run-id> --log

Local Development

# Build all variants locally (uses VERSION file for default version)
make build

# Build specific variants
make build-base version=25-al2023
make build-jemalloc version=25-al2023    # Multi-arch

# Without access to the Seqera ECR pull-through cache, pull base images from public.ecr.aws
make build-base-local version=25-al2023 ECR_MIRROR=public.ecr.aws

Base images are pulled through the Seqera central ECR pull-through cache of public.ecr.aws (ECR_MIRROR in the Makefile), which avoids public.ecr.aws anonymous rate limits in CI. CI logs in with the gha-thirdparty-puller OIDC role; fork PRs fall back to public.ecr.aws.

To add or change JDK versions, edit only the Makefile: add to VERSIONS, add a CORRETTO_* base image pin (with digest, as $(ECR_MIRROR)/<image>:<tag>@sha256:...), and a base_image_* mapping. Renovate looks those pins up on public.ecr.aws and proposes digest updates.

Memory Allocator Performance

When to Use Each Variant

  • Base: Default choice for standard applications
  • Jemalloc: CPU-intensive workloads with heavy memory allocation (AMD64/ARM64)

Performance Characteristics

  • Jemalloc: Excellent for server workloads with sustained memory allocation patterns
  • System Default: Adequate for most use cases, lowest complexity

Technical Documentation

For detailed technical information, build system architecture, and development guidelines, see CLAUDE.md.

References

About

Seqera JDK base image

Resources

Stars

0 stars

Watchers

7 watching

Forks

Releases

Packages

Used by

Contributors

Languages