Multi-architecture Java JDK containers optimized with different memory allocators for backend execution in the Seqera ecosystem.
This project builds two types of Java containers, each optimized for different use cases:
- Image:
nf-jdk:corretto-{version}
- Architecture: AMD64, ARM64
- Memory Allocator: System default
- Use Case: Standard Java applications
- 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
Variant | AMD64 | ARM64 | Notes |
---|---|---|---|
Base | ✅ | ✅ | Standard Java runtime |
Jemalloc | ✅ | ✅ | Multi-arch via AL2023 package |
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)
Images are published to Seqera Labs' container registry:
- Registry:
cr.seqera.io/public
- Repository:
nf-jdk
# Pull base containers
docker pull cr.seqera.io/public/nf-jdk:corretto-25-al2023
docker pull cr.seqera.io/public/nf-jdk:corretto-21-al2023
docker pull cr.seqera.io/public/nf-jdk:corretto-17-al2023
# Pull jemalloc-optimized containers (multi-architecture)
docker pull cr.seqera.io/public/nf-jdk:corretto-25-al2023-jemalloc
docker pull cr.seqera.io/public/nf-jdk:corretto-21-al2023-jemalloc
docker pull cr.seqera.io/public/nf-jdk:corretto-17-al2023-jemalloc
This project uses the Amazon Linux 2023 jemalloc package instead of custom compilation, which provides several benefits:
- 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
- Uses standard package manager installation (
yum install jemalloc
) - Eliminates complex binary compilation and artifact management
- Reduced build time and fewer potential failure points
- Officially maintained and regularly updated by AWS
- Security patches automatically included in package updates
- Consistent with Amazon Linux 2023 ecosystem optimizations
Jemalloc may have compatibility issues with ARM64 systems that use different page sizes, particularly:
- Apple Silicon (16K pages): As documented in Facebook Buck2 issue #91 and jemalloc issue #2178
- Some ARM64 server systems (64K pages): See Red Hat Bugzilla #1545539
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.
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: Builds 6 containers per run (3 versions × 2 variants)
- Package Installation: Jemalloc uses Amazon Linux 2023 package manager
- Container Building: Multi-architecture container builds with optimized layers
- Automatic Publishing: Images pushed to registry during build process
# 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
# Build all variants locally
make build
# Build specific variants
make build-base version=25-al2023
make build-jemalloc version=25-al2023 # Multi-arch
- Base: Default choice for standard applications
- Jemalloc: CPU-intensive workloads with heavy memory allocation (AMD64/ARM64)
- Jemalloc: Excellent for server workloads with sustained memory allocation patterns
- System Default: Adequate for most use cases, lowest complexity
For detailed technical information, build system architecture, and development guidelines, see CLAUDE.md.