专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题轩辕镜像免费版
其他
关于我们网站地图
热门搜索:
java-alpine-openjdk11-jre

fabric8/java-alpine-openjdk11-jre

fabric8

Fabric8 Java Base Image (Alpine, OpenJDK 11, JRE)

7 次收藏下载次数: 0状态:社区镜像维护者:fabric8仓库类型:镜像最近更新:4 年前
轩辕镜像,加速的不只是镜像。点击查看
镜像简介
标签下载
镜像标签列表与下载命令
轩辕镜像,加速的不只是镜像。点击查看

Fabric8 Java Base Image OpenJDK 11 (JRE)

This image is based on Alpine and provides OpenJDK 11 (JRE)

It includes:

  • An https://github.com/fabric8io/agent-bond agent with Jolokia and Prometheus' https://github.com/prometheus/jmx_exporter. The agent is installed as /opt/agent-bond/agent-bond.jar. See below for configuration options.

  • A startup script /deployments/run-java.sh for starting up Java applications.

Agent Bond

In order to enable Jolokia for your application you should use this image as a base image (via FROM) and use the output of agent-bond-opts in your startup scripts to include it in for the Java startup options.

For example, the following snippet can be added to a script starting up your Java application

# ...
export JAVA_OPTIONS="$JAVA_OPTIONS $(agent-bond-opts)"
# .... use JAVA_OPTIONS when starting your app, e.g. as Tomcat does

The following versions and defaults are used:

  • Jolokia : version 1.6.2 and port 8778
  • https://github.com/prometheus/jmx_exporter: version 0.3.1 and port 9779

You can influence the behaviour of agent-bond-opts by setting various environment variables:

Agent-Bond Options

Agent bond itself can be influenced with the following environment variables:

  • AB_OFF : If set disables activation of agent-bond (i.e. echos an empty value). By default, agent-bond is enabled.
  • AB_ENABLED : Comma separated list of sub-agents enabled. Currently allowed values are jolokia and jmx_exporter. By default both are enabled.

Jolokia configuration

  • AB_JOLOKIA_CONFIG : If set uses this file (including path) as Jolokia JVM agent properties (as described in Jolokia's reference manual). By default this is /opt/jolokia/jolokia.properties.
  • AB_JOLOKIA_HOST : Host address to bind to (Default: 0.0.0.0)
  • AB_JOLOKIA_PORT : Port to use (Default: 8778)
  • AB_JOLOKIA_USER : User for authentication. By default authentication is switched off.
  • AB_JOLOKIA_HTTPS : Switch on secure communication with https. By default self signed server certificates are generated if no serverCert configuration is given in AB_JOLOKIA_OPTS
  • AB_JOLOKIA_PASSWORD : Password for authentication. By default authentication is switched off.
  • AB_JOLOKIA_ID : Agent ID to use ($HOSTNAME by default, which is the container id)
  • AB_JOLOKIA_OPTS : Additional options to be appended to the agent opts. They should be given in the format "key=value,key=value,..."

Some options for integration in various environments:

  • AB_JOLOKIA_AUTH_OPENSHIFT : Switch on client authentication for OpenShift TLS communication. The value of this parameter can be a relative distinguished name which must be contained in a presented client certificate. Enabling this parameter will automatically switch Jolokia into https communication mode. The default CA cert is set to /var/run/secrets/kubernetes.io/serviceaccount/ca.crt

jmx_exporter configuration

  • AB_JMX_EXPORTER_OPTS : Configuration to use for jmx_exporter (in the format <port>:<path to config>)
  • AB_JMX_EXPORTER_PORT : Port to use for the JMX Exporter. Default: 9779
  • AB_JMX_EXPORTER_CONFIG : Path to configuration to use for jmx_exporter: Default: /opt/agent-bond/jmx_exporter_config.json

Startup Script run-java.sh

The default command for this image is https://github.com/fabric8io/run-java-sh. Its purpose it to fire up Java applications which are provided as fat-jars, including all dependencies or more classical from a main class, where the classpath is build up from all jars within a directory.

For these images the variable JAVA_APP_DIR has the default value /deployments

run-java.sh

This general purpose startup script is optimized for running Java application from within containers. It is called like

./run-java.sh <sub-command> <options>

run-java.sh knows two sub-commands:

  • options to print out JVM option which can be used for own invocation of Java apps (like Maven or Tomcat). It respects container constraints and includes all magic which is used by this script
  • run executes a Java application as described below. This is also the default command so you can skip adding this command.

Running a Java application

When no subcommand is given (or when you provide the default subcommand run), then by default this scripts starts up Java application.

The startup process is configured mostly via environment variables:

  • JAVA_APP_DIR the directory where the application resides. All paths in your application are relative to this directory. By default it is the same directory where this startup script resides.
  • JAVA_LIB_DIR directory holding the Java jar files as well an optional classpath file which holds the classpath. Either as a single line classpath (colon separated) or with jar files listed line-by-line. If not set JAVA_LIB_DIR is the same as JAVA_APP_DIR.
  • JAVA_OPTIONS options to add when calling java
  • JAVA_MAJOR_VERSION a number >= 7. If the version is set then only options suitable for this version are used. When set to 7 options known only to Java > 8 will be removed. For versions >= 10 no explicit memory limit is calculated since Java >= 10 has support for container limits. If omitted, this parameter's value will be guessed using the JAVA_VERSION variable, the release file or parsing the java -version command output.
  • JAVA_MAX_MEM_RATIO is used when no -Xmx option is given in JAVA_OPTIONS. This is used to calculate a default maximal Heap Memory based on a containers restriction. If used in a Docker container without any memory constraints for the container then this option has no effect. If there is a memory constraint then -Xmx is set to a ratio of the container available memory as set here. The default is 25 when the maximum amount of memory available to the container is below 300M, 50 otherwise, which means in that case that 50% of the available memory is used as an upper boundary. You can skip this mechanism by setting this value to 0 in which case no -Xmx option is added.
  • JAVA_INIT_MEM_RATIO is used when no -Xms option is given in JAVA_OPTIONS. This is used to calculate a default initial Heap Memory based on a containers restriction. If used in a Docker container without any memory constraints for the container then this option has no effect. If there is a memory constraint then -Xms is set to a ratio of the container available memory as set here. By default this value is not set.
  • JAVA_MAX_CORE restrict manually the number of cores available which is used for calculating certain defaults like the number of garbage collector threads. If set to 0 no base JVM tuning based on the number of cores is performed.
  • JAVA_DIAGNOSTICS set this to get some diagnostics information to standard out when things are happening
  • JAVA_MAIN_CLASS A main class to use as argument for java. When this environment variable is given, all jar files in $JAVA_APP_DIR are added to the classpath as well as $JAVA_LIB_DIR.
  • JAVA_APP_JAR A jar file with an appropriate manifest so that it can be started with java -jar if no $JAVA_MAIN_CLASS is set. In all cases this jar file is added to the classpath, too.
  • JAVA_APP_NAME Name to use for the process
  • JAVA_CLASSPATH the classpath to use. If not given, the startup script checks for a file ${JAVA_APP_DIR}/classpath and use its content literally as classpath. If this file doesn't exists all jars in the app dir are added (classes:${JAVA_APP_DIR}/*).
  • JAVA_DEBUG If set remote debugging will be switched on
  • JAVA_DEBUG_SUSPEND If set enables suspend mode in remote debugging
  • JAVA_DEBUG_PORT Port used for remote debugging. Default: 5005
  • HTTP_PROXY The URL of the proxy server that translates into the http.proxyHost and http.proxyPort system properties.
  • HTTPS_PROXY The URL of the proxy server that translates into the https.proxyHost and https.proxyPort system properties.
  • no_proxy, NO_PROXY The list of hosts that should be reached directly, bypassing the proxy, that translates into the http.nonProxyHosts system property.

If neither $JAVA_APP_JAR nor $JAVA_MAIN_CLASS is given, $JAVA_APP_DIR is checked for a single JAR file which is taken as $JAVA_APP_JAR. If no or more then one jar file is found, an error is thrown.

The classpath is build up with the following parts:

  • If $JAVA_CLASSPATH is set, this classpath is taken.
  • The current directory (".") is added first.
  • If the current directory is not the same as $JAVA_APP_DIR, $JAVA_APP_DIR is added.
  • If $JAVA_MAIN_CLASS is set, then
    • A $JAVA_APP_JAR is added if set
    • If a file $JAVA_APP_DIR/classpath exists, its content is appended to the classpath. This file can be either a single line with the jar files colon separated or a multi-line file where each line holds the path of the jar file relative to $JAVA_LIB_DIR (which by default is the $JAVA_APP_DIR)
    • If this file is not set, a ${JAVA_APP_DIR}/* is added which effectively adds all jars in this directory in alphabetical order.

These variables can be also set in a shell config file run-env.sh, which will be sourced by the startup script. This file can be located in the directory where the startup script is located and in ${JAVA_APP_DIR}, whereas environment variables in the latter override the ones in run-env.sh from the script directory.

This startup script also checks for a command run-java-options. If existent it will be called and the output is added to the environment variable $JAVA_OPTIONS.

The startup script also exposes some environment variables describing container limits which can be used by applications:

  • CONTAINER_CORE_LIMIT a calculated core limit as described in [***]
  • CONTAINER_MAX_MEMORY memory limit given to the container

Any arguments given to the script are given through directly as argument to the Java application.

Example:

# Set the application directory directly
export JAVA_APP_DIR=/deployments
# Set -Xmx based on container constraints
export JAVA_MAX_MEM_RATIO=40
# Start the jar in JAVA_APP_DIR with the given arguments
./run-java.sh --user maxmorlock --password secret

Options

This script can also be used to calculate reasonable, best-practice options for starting Java apps in general. For example, when running Maven in a container it makes sense to respect container Memory constraints.

The subcommand options can be used to print options to standard output so that is can be easily used to feed it to another, Java based application.

When no extra arguments are given, all defaults will be used, which can be influenced with the environment variables described above.

You can select specific sets of options by providing additional arguments:

  • --debug : Java debug options if JAVA_DEBUG is set
  • --memory : Memory settings based on the environment variables given
  • --proxy : Evaluate proxy environments variables
  • --cpu : Tuning when the number of cores is limited
  • --gc : GC tuning parameters
  • --jit : JIT options
  • --diagnostics : Print diagnostics options when JAVA_DIAGNOSTICS is set
  • --java-default : Same as --memory --jit --diagnostic --cpu --gc

Example:

# Call Maven with the proper memory settings when running in an container
export MAVEN_OPTS="$(run-java.sh options --memory)"
mvn clean install

Versions:

  • Base-Image: Alpine 3.11
  • Java: OpenJDK 11 11 (Java Runtime Environment (JRE))
  • Agent-Bond: 1.2.0 (Jolokia 1.6.2, jmx_exporter 0.3.1)

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 java-alpine-openjdk11-jre 镜像标签

docker pull docker.xuanyuan.run/fabric8/java-alpine-openjdk11-jre:<标签>

使用方法:

  • 登录认证方式
  • 免认证方式

DockerHub 原生拉取命令

docker pull fabric8/java-alpine-openjdk11-jre:<标签>

更多 java-alpine-openjdk11-jre 镜像推荐

alpine/git logo

alpine/git

Alpine 工具与轻量镜像
这是一个运行于Alpine Linux系统中的简易Git容器,Alpine Linux以其极致精简的特性为基础,使得该容器在保持Git核心功能的同时,具备轻量高效的运行表现,尤其适用于各类小型Linux发行版环境,能够满足资源受限场景下的版本控制需求,为嵌入式系统、边缘设备或轻量级开发环境提供便捷的Git服务支持。
252 次收藏1亿+ 次下载
4 小时前更新
alpine/java logo

alpine/java

Alpine 工具与轻量镜像
此代码库包含用于生成官方Eclipse Temurin Java容器的构建脚本,是Adoptium项目生态的重要组成部分,旨在通过标准化的脚本流程确保所构建的Java容器镜像符合官方规范,支持不同Java版本与操作系统平台的适配,为开发者提供可靠、一致的Eclipse Temurin Java运行环境容器化解决方案,助力Java应用的便捷部署与跨环境运行。
5 次收藏10万+ 次下载
1 年前更新
alpine logo

library/alpine

Docker 官方镜像
这是一款基于轻量级Alpine Linux构建的最小化Docker镜像,它不仅包含完整的软件包索引以确保用户能便捷获取所需依赖,而且体积仅为5MB,能极大节省存储空间与网络传输资源,非常适合对资源占用有严格要求的容器化应用场景,为快速部署和高效运行提供了轻量可靠的基础环境。
1.2万 次收藏10亿+ 次下载
1 个月前更新
alpine/curl logo

alpine/curl

Alpine 工具与轻量镜像
基于Alpine Linux的轻量级Docker镜像,集成了curl命令行工具,专为网络数据传输设计。支持HTTP、HTTPS、FTP等多种协议,可用于API测试、文件下载、服务监控等场景。得益于Alpine的精简特性,镜像体积小巧,启动快速,非常适合在容器化环境中执行临时网络请求或自动化任务,是开发调试、CI/CD流程及微服务健康检查的理想工具。
12 次收藏5000万+ 次下载
1 天前更新
alpine/socat logo

alpine/socat

Alpine 工具与轻量镜像
基于Alpine的轻量级容器,用于运行socat网络工具,实现端口转发、数据流转发等网络通信功能。
115 次收藏5000万+ 次下载
21 小时前更新
alpine/helm logo

alpine/helm

Alpine 工具与轻量镜像
当Kubernetes Helm有新发布时自动触发Docker构建的镜像
70 次收藏5000万+ 次下载
17 天前更新

查看更多 java-alpine-openjdk11-jre 相关镜像

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

Docker 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

Harbor 镜像源配置

Harbor Proxy Repository 对接专属域名

Portainer 镜像源配置

Portainer Registries 加速拉取

Nexus 镜像源配置

Nexus3 Docker Proxy 内网缓存

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

使用与功能问题

配置了专属域名后,docker search 为什么会报错?

docker search 限制

Docker Hub 上有的镜像,为什么在轩辕镜像网站搜不到?

站内搜不到镜像

机器不能直连外网时,怎么用 docker save / load 迁镜像?

离线 save/load

docker pull 拉插件报错(plugin v1+json)怎么办?

插件要用 plugin install

WSL 里 Docker 拉镜像特别慢,怎么排查和优化?

WSL 拉取慢

轩辕镜像安全吗?如何用 digest 校验镜像没被篡改?

安全与 digest

第一次用轩辕镜像拉 Docker 镜像,要怎么登录和配置?

新手拉取配置

轩辕镜像合规吗?轩辕镜像的合规是怎么做的?

镜像合规机制

轩辕镜像支持 docker push 上传本地镜像吗?

不支持 push

错误码与失败问题

docker pull 提示 manifest unknown 怎么办?

manifest unknown

docker pull 提示 no matching manifest 怎么办?

no matching manifest(架构)

镜像已拉取完成,却提示 invalid tar header 或 failed to register layer 怎么办?

invalid tar header(解压)

Docker pull 时 HTTPS / TLS 证书验证失败怎么办?

TLS 证书失败

Docker pull 时 DNS 解析超时或连不上仓库怎么办?

DNS 超时

docker 无法连接轩辕镜像域名怎么办?

域名连通性排查

Docker 拉取出现 410 Gone 怎么办?

410 Gone 排查

出现 402 或「流量用尽」提示怎么办?

402 与流量用尽

Docker 拉取提示 UNAUTHORIZED(401)怎么办?

401 认证失败

遇到 429 Too Many Requests(请求太频繁)怎么办?

429 限流

docker login 提示 Cannot autolaunch D-Bus,还算登录成功吗?

D-Bus 凭证提示

为什么会出现「单层超过 20GB」或 413,无法加速拉取?

413 与超大单层

账号 / 计费 / 权限

轩辕镜像免费版和专业版有什么区别?

免费版与专业版区别

轩辕镜像支持哪些 Docker 镜像仓库?

支持的镜像仓库

镜像拉取失败还会不会扣流量?

失败是否计费

麒麟 V10 / 统信 UOS 提示 KYSEC 权限不够怎么办?

KYSEC 拦截脚本

如何在轩辕镜像申请开具发票?

申请开票

怎么修改轩辕镜像的网站登录和仓库登录密码?

修改登录密码

如何注销轩辕镜像账户?要注意什么?

注销账户

配置与原理类

写了 registry-mirrors,为什么还是走官方或仍然报错?

mirrors 不生效

怎么用 docker tag 去掉镜像名里的轩辕域名前缀?

去掉域名前缀

如何拉取指定 CPU 架构的镜像(如 ARM64、AMD64)?

指定架构拉取

用轩辕镜像拉镜像时快时慢,常见原因有哪些?

拉取速度原因

为什么拉取镜像的 :latest 标签,拿到的往往不是「最新」镜像?

latest 与「最新」

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
fabric8/java-alpine-openjdk11-jre
博客Docker 镜像公告与技术博客
热门查看热门 Docker 镜像推荐
安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单。官方公众号:源码跳动。官方技术交流群:51517718。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单。官方公众号:源码跳动。官方技术交流群:。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.