This container can be used to compile and assemble OpenNMS from source code. Primary distribution for OpenNMS RHEL or CentOS. The environment is built on official vanilla CentOS 7 and uses Docker multi-stage build which requires an edge release of Docker.
The versions in Ubuntu or CentOS are too old so please use the Docker install instructions. As a result it will give you a container image which is ready to run.
It is recommended to use Docker Compose to describe your service stack. The minimal service stack needs PostgreSQL and your OpenNMS container image.
Compiling and installing is realized within the following stages:
To remove as many dependencies as possible and to make migration to other base images easier, the installation uses a distribution neutral mechanism by just extracting the assembled OpenNMS to /opt/opennms.
In the build process, dependencies against Perl and other Bash scripts where removed and native Maven commands are executed which makes the whole build process more transparent.
Compile and assemble OpenNMS, by default the official OpenNMS GitHub repository is used and the develop branch will be checked out.
docker build -t myopennms [***]
In the GitHub repository is a sample docker-compose.yml file which can be used to build and run the service stack.
HINT: Verify the image name you have specified with -t myopennms is used in docker-compose.yml file.
Run OpenNMS
docker-compose up -d
The following build arguments can be used with (--build-arg myarg=value) to overwrite the default behavior.
Example to compile a specific OpenNMS branch named jira/NMS-9328 by setting build arguments and set the container image name to the issue number:
docker build \ -t nms-9328 \ [***] \ --build-arg OPENNMS_GIT_BRANCH_REF=jira/NMS-9328
| Argument | Default | Description |
|---|---|---|
| JAVA_VERSION | 1.8.0 | Major OpenJDK version |
| JAVA_VERSION_DETAIL | 1.8.0.144 | Version number used in OpenJDK RPM package |
| MAVEN_VERSION | 3.5.0 | Version number for Apache Maven |
| MAVEN_URL | [***] | Server URL for Apache Maven package |
| MAVEN_PKG | ${MAVEN_URL}/apache/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz | Maven binary package URL |
| MAVEN_PROXY_URL | not set uses the OpenNMS provided Maven repo | Alternative Maven proxy server, e.g. with JFrog http://<jfrog-ip>:8081/artifactory/remote-repos/ |
| NSIS_RPM_URL | [***] | Make NSIS Package URL |
| JICMP_GIT_REPO_URL | [***] | Git repository URL for JICMP |
| JICMP_GIT_BRANCH_REF | jicmp-2.0.4-1 | Tag or branch for JICMP |
| JICMP_SRC | /usr/src/jicmp | Source directory for JICMP |
| JICMP6_GIT_REPO_URL | [***] | Git repository URL for JICMP6 |
| JICMP6_GIT_BRANCH_REF | jicmp6-2.0.3-1 | Tag or branch for JICMP6 |
| JICMP6_SRC | /usr/src/jicmp6 | Source directory for JICMP6 |
| JRRD2_GIT_REPO_URL | [***] | Git repository URL for JRRD2 |
| JRRD2_GIT_BRANCH_REF | 2.0.4 | Tag or branch for JRRD2 |
| JRRD2_SRC | /usr/src/jrrd2 | Source directory for JRRD2 |
| OPENNMS_SRC | /usr/src/opennms | Source directory for OpenNMS |
| OPENNMS_HOME | /opt/opennms | Target directory for OpenNMS |
| MAVEN_OPTS | "-XX:MaxHeapSize=2G -XX:ReservedCodeCacheSize=512m -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:-UseGCOverheadLimit -XX:+UseParallelGC -XX:+UseParallelOldGC" | Default Maven options to compile and assemble OpenNMS from source |
| OPENNMS_GIT_REPO_URL | [***] | Git repository URL for OpenNMS |
| OPENNMS_GIT_BRANCH_REF | develop | Tag or branch for OpenNMS |
| BUILD_OPTIONS | "-q -DskipTests" | Custom Maven options for compile and assembly |
Ronny Trommer
来自真实用户的反馈,见证轩辕镜像的优质服务
免费版仅支持 Docker Hub 加速,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
免费版仅支持 docker.io;专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像加速服务
在 Docker Desktop 配置镜像加速
Docker Compose 项目配置加速
Kubernetes 集群配置 Containerd
在宝塔面板一键配置镜像加速
Synology 群晖 NAS 配置加速
飞牛 fnOS 系统配置镜像加速
极空间 NAS 系统配置加速服务
爱快 iKuai 路由系统配置加速
绿联 NAS 系统配置镜像加速
QNAP 威联通 NAS 配置加速
Podman 容器引擎配置加速
HPC 科学计算容器配置加速
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名加速
需要其他帮助?请查看我们的 常见问题 或 官方QQ群: 13763429