This repository contains secure and feature-rich base Alpine Linux images for containerized applications, designed with security and flexibility in mind.
A minimal Alpine-based image with essential security and system utilities.
There are three Java images based on Alpine:
- Java 21 with JDK and profiler:
qubership-java-base:21-alpine-xxx - Java 25 with JRE:
qubership-java-base:25-alpine-xxx - Java 25 with JRE and profiler:
qubership-java-base-prof:25-alpine-xxx
An Alpine-based NGINX image with Lua, Brotli compression, OpenTelemetry instrumentation, and common modules (HTTP/2, SSL, auth_request, sub filter, stub status, headers-more). Built on the core base image for consistent security and runtime behavior.
FROM ghcr.io/netcracker/qubership-core-base:latestNote: There is obsolete image labels named qubership/core-base:latest. Please, do not use it!
Java 21 (JDK with profiler):
FROM ghcr.io/netcracker/qubership-java-base:21-alpine-latestJava 25 (JRE only):
FROM ghcr.io/netcracker/qubership-java-base:25-alpine-latestJava 25 (JRE with profiler):
FROM ghcr.io/netcracker/qubership-java-base-prof:25-alpine-latestNote: There are obsolete image labels named qubership/java-base:latest. Please, do not use them!
Note: Images are available on GitHub Container Registry (ghcr.io/netcracker/qubership/) and support multi-platform builds (linux/amd64, linux/arm64). Use platform-specific tags if needed.
FROM ghcr.io/netcracker/qubership-nginx-base:latestNote: The Nginx image is published as ghcr.io/netcracker/qubership-nginx-base and supports multi-platform builds (linux/amd64, linux/arm64).
- Based on Alpine Linux 3.23.3
- Pre-configured with essential security settings
- Built-in certificate management (including Kubernetes service account certificates)
- User management with nss_wrapper support
- Volume management for certificates and NSS data
- Graceful shutdown handling
- Initialization script support
- UTF-8 locale configuration
- Multi-platform support (linux/amd64, linux/arm64)
- Base Image:
alpine:3.23.3 - Default User:
appuser(UID: 10001) - Default Home:
/app - Default Language:
en_US.UTF-8
ca-certificates: Latest versioncurl: Latest versionbash: Latest versionnss_wrapper: Latest version
/tmp/app/nss/etc/ssl/certs/usr/local/share/ca-certificates
- Base Image:
alpine:3.23.3(via core base image) - Java Version: OpenJDK 21 (JDK)
- Default User:
appuser(UID: 10001) - Default Home:
/app - Default Language:
en_US.UTF-8
openjdk21-jdk: Latest versionfontconfig: Latest versionfont-dejavu: Latest versionprocps-ng: Latest versioncurl: Latest versionbash: Latest versionlibstdc++: Latest versionnss_wrapper: Latest version- And all base Alpine dependencies
JAVA_HOME:/usr/lib/jvm/java-21-openjdkMALLOC_ARENA_MAX: 2MALLOC_MMAP_THRESHOLD_: 131072MALLOC_TRIM_THRESHOLD_: 131072MALLOC_TOP_PAD_: 131072MALLOC_MMAP_MAX: 65536
- Base Image:
alpine:3.23.3(via core base image) - Java Version: OpenJDK 25 (JRE)
- Default User:
appuser(UID: 10001) - Default Home:
/app - Default Language:
en_US.UTF-8
openjdk25-jre-headless: Latest versioncurl: Latest versionbash: Latest versionnss_wrapper: Latest version- And all base Alpine dependencies
JAVA_HOME:/usr/lib/jvm/default-jvmMALLOC_ARENA_MAX: 2MALLOC_MMAP_THRESHOLD_: 131072MALLOC_TRIM_THRESHOLD_: 131072MALLOC_TOP_PAD_: 131072MALLOC_MMAP_MAX: 65536
- Base Image:
ghcr.io/netcracker/qubership-core-base:latest(Alpine 3.23.3) - NGINX Version: 1.28.3
- Default Language:
en_US.UTF-8
- HTTP/2, SSL/TLS, gunzip, gzip static
- Lua (LuaJIT 2.1) with lua-nginx-module, lua-resty-core, lua-resty-lrucache
- Brotli compression (ngx_brotli, dynamic module)
- OpenTelemetry instrumentation (nginx-otel native module by nginxinc)
- auth_request, sub filter, stub_status, headers-more
The image inherits all base Alpine features (certificate management, nss_wrapper, init.d scripts, signal handling, etc.).
The Java Alpine images (Java 21 and Java 25 profiler variants) include built-in support for the Qubership profiler:
- Profiler Version: 3.1.6 (configurable via build arg
QUBERSHIP_PROFILER_VERSION) - Artifact Source: Configurable via build arg
QUBERSHIP_PROFILER_ARTIFACT_SOURCE(local or remote from Maven Central) - Enable Profiler: Set environment variable
PROFILER_ENABLED=true - Profiler Directory:
/app/diag - Dump Directory:
/app/diag/dump - Multi-platform Support: Automatically downloads platform-specific artifacts based on
TARGETOSandTARGETARCHbuild args
- Certificate Location:
/etc/ssl/certs/java/cacerts(Java keystore) - Certificate Password: Configurable via
CERTIFICATE_FILE_PASSWORDenvironment variable - Certificate Sources:
/tmp/cert/directory (.crt,.cer, or.pemfiles)- Kubernetes service account certificates from
/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
/app
├── init.d/ # Initialization scripts
├── nss/ # NSS wrapper data
├── ncdiag/ # Diagnostic and troubleshooting data (base image)
├── diag/ # Profiler diagnostics (Java profiler images only)
│ ├── lib/ # Profiler libraries
│ └── dump/ # Profiler dumps
└── volumes/
└── certs/ # Certificate storage
- Non-root user execution (UID: 10001)
- Secure certificate handling
- Proper file permissions
- Volume isolation for sensitive data
- NSS wrapper integration
The entrypoint script performs the following operations:
- Restores volume data: Copies certificate data from
/app/volumes/certs/to the appropriate certificate locations - Creates user if necessary: Uses nss_wrapper to create the appuser entry if the user doesn't exist in
/etc/passwd - Loads certificates to trust store:
- Scans
/tmp/cert/directory for certificate files - Automatically detects and loads Kubernetes service account certificates from
/var/run/secrets/kubernetes.io/serviceaccount/ca.crt - For Java images: imports certificates into the Java keystore using
keytool - For base images: copies certificates and runs
update-ca-certificates
- Scans
- Loads profiler bootstrap (Java profiler images only): Sources
/app/diag/diag-bootstrap.shto make profiler functions available - Executes initialization scripts: Runs all
.shscripts from/app/init.d/in alphabetical order (only in non-interactive mode) - Runs the main application: Executes the provided command with proper signal handling and crash dump collection
Certificates can be added in two ways:
-
Manual placement: Place your certificates (
.crt,.cer, or.pemfiles) in/tmp/cert/directory. They will be automatically loaded into the trust store. -
Kubernetes integration: The image automatically detects and loads Kubernetes service account certificates from
/var/run/secrets/kubernetes.io/serviceaccount/ca.crtif mounted.
For Java images, certificates are imported into the Java keystore. The keystore password can be customized via the CERTIFICATE_FILE_PASSWORD environment variable (default: changeit).
OpenShift / random UID support: When running under a random UID (e.g., on OpenShift), update-ca-certificates may fail due to non-standard file permissions. In this case, the entrypoint automatically falls back to using trust extract to rebuild the Java keystore from the system trust anchors.
Place your initialization scripts (.sh files) in /app/init.d/. They will be executed in alphabetical order before the main application starts.
To enable the profiler in Java Alpine images (Java 21 or Java 25 profiler variants):
# Set environment variable to enable profiler
export PROFILER_ENABLED=true
# Run your Java application
java -jar your-app.jarThe profiler will automatically:
- Load the profiler agent from
/app/diag/lib/agent.jar - Set up dump directory at
/app/diag/dump - Configure Java tool options for profiling via
JAVA_TOOL_OPTIONS - Provide crash dump functionality via
send_crash_dumpfunction
The profiler agent is automatically loaded via diag-bootstrap.sh script sourced in the entrypoint.
The images include comprehensive signal handling for graceful shutdowns and proper process management. They support all standard Linux signals (SIGHUP, SIGINT, SIGQUIT, SIGTERM, etc.) and ensure proper cleanup on container termination.
For SIGTERM signals, there is a 10-second delay to prevent 503/502 errors during deployment rollouts. The entrypoint script properly forwards all signals to the child process and handles exit codes appropriately.
Note: Signal handling is disabled when running in interactive shell mode (bash or sh commands) to avoid interfering with terminal signal handling.
This project provides a helper logging function named log used by the entrypoint script. Below are usage examples and important interpreter limitations.
The log function is exported from entrypoint script and is available only to child processes that are Bash. For example, bash -c 'log INFO "msg"' works, but sh -c 'log ...' will not.
custom_script.sh
#!/usr/bin/env bash
log INFO HiLog output:
#> ./custom_script.sh
[2026-01-22T08:58:47.000] [INFO] [request_id=-] [tenant_id=-] [thread=-] [class=-] [custom_script.sh] Hi If you need to run a container in a read-only host environment, you must mount the required writable paths as --tmpfs volumes or as emptyDir volumes in Kubernetes.
/tmp- to persist temporary files/etc/env- to manage environment configurations/app/nss- to manage NSS (Network Security Services) data/app/ncdiag- to store diagnostic and troubleshooting data/etc/ssl/certs/java- to handle Java SSL certificates (declared as a volume in profiler images), or/etc/ssl/certsfor non-Java images/var/logand/var/cache/nginx/*- for NGINX image (logs and cache directories)
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the terms specified in the LICENSE file.