专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏

maven Docker 镜像 - 轩辕镜像

maven
library/maven
Apache Maven是一款基于项目对象模型(POM)的软件项目管理与理解工具,主要用于自动化项目构建流程、统一管理项目依赖、整合项目信息(如文档、报告等),并通过标准化的项目结构和生命周期管理,帮助开发团队提高协作效率、简化构建过程,确保项目开发的一致性与可重复性。
1663 收藏0 次下载activelibrary镜像
🚀专业版镜像服务,面向生产环境设计
版本下载
🚀专业版镜像服务,面向生产环境设计

Quick reference

  • Maintained by:
    Carlos Sanchez

  • Where to get help:
    the Docker Community Slack, Server Fault, Unix & Linux, or Stack Overflow

Supported tags and respective Dockerfile links

  • 3.9.12-eclipse-temurin-11-alpine, 3.9-eclipse-temurin-11-alpine, 3-eclipse-temurin-11-alpine

  • 3.9.12-eclipse-temurin-11-noble, 3.9.12-eclipse-temurin-11, 3.9-eclipse-temurin-11-noble, 3.9-eclipse-temurin-11, 3-eclipse-temurin-11-noble, 3-eclipse-temurin-11

  • 3.9.12-eclipse-temurin-17-alpine, 3.9-eclipse-temurin-17-alpine, 3-eclipse-temurin-17-alpine

  • 4.0.0-rc-5-eclipse-temurin-17-alpine

  • 3.9.12-eclipse-temurin-17-noble, 3.9.12-eclipse-temurin-17, 3.9-eclipse-temurin-17-noble, 3.9-eclipse-temurin-17, 3-eclipse-temurin-17-noble, 3-eclipse-temurin-17

  • 4.0.0-rc-5-eclipse-temurin-17-noble, 4.0.0-rc-5-eclipse-temurin-17

  • 3.9.12-eclipse-temurin-21-alpine, 3.9-eclipse-temurin-21-alpine, 3-eclipse-temurin-21-alpine

  • 4.0.0-rc-5-eclipse-temurin-21-alpine

  • 3.9.12-eclipse-temurin-21-noble, 3.9.12-eclipse-temurin-21, 3.9-eclipse-temurin-21-noble, 3.9-eclipse-temurin-21, 3-eclipse-temurin-21-noble, 3-eclipse-temurin-21

  • 4.0.0-rc-5-eclipse-temurin-21-noble, 4.0.0-rc-5-eclipse-temurin-21

  • 3.9.12-eclipse-temurin-25-alpine, 3.9-eclipse-temurin-25-alpine, 3-eclipse-temurin-25-alpine

  • 4.0.0-rc-5-eclipse-temurin-25-alpine

  • 3.9.12-eclipse-temurin-25-noble, 3.9.12, 3.9.12-eclipse-temurin, 3.9.12-eclipse-temurin-25, 3.9-eclipse-temurin-25-noble, 3.9, 3.9-eclipse-temurin, 3.9-eclipse-temurin-25, 3-eclipse-temurin-25-noble, 3, latest, 3-eclipse-temurin, eclipse-temurin, 3-eclipse-temurin-25

  • 4.0.0-rc-5-eclipse-temurin-25-noble, 4.0.0-rc-5, 4.0.0-rc-5-eclipse-temurin, 4.0.0-rc-5-eclipse-temurin-25

  • 3.9.12-eclipse-temurin-8-alpine, 3.9-eclipse-temurin-8-alpine, 3-eclipse-temurin-8-alpine

  • 3.9.12-eclipse-temurin-8-noble, 3.9.12-eclipse-temurin-8, 3.9-eclipse-temurin-8-noble, 3.9-eclipse-temurin-8, 3-eclipse-temurin-8-noble, 3-eclipse-temurin-8

  • 3.9.12-ibmjava-8, 3.9.12-ibmjava, 3.9-ibmjava-8, 3.9-ibmjava, 3-ibmjava-8, 3-ibmjava, ibmjava

  • 3.9.12-ibm-semeru-11-noble, 3.9-ibm-semeru-11-noble, 3-ibm-semeru-11-noble

  • 3.9.12-ibm-semeru-17-noble, 3.9-ibm-semeru-17-noble, 3-ibm-semeru-17-noble

  • 4.0.0-rc-5-ibm-semeru-17-noble

  • 3.9.12-ibm-semeru-21-noble, 3.9-ibm-semeru-21-noble, 3-ibm-semeru-21-noble

  • 4.0.0-rc-5-ibm-semeru-21-noble

  • 3.9.12-ibm-semeru-25-noble, 3.9-ibm-semeru-25-noble, 3-ibm-semeru-25-noble

  • 4.0.0-rc-5-ibm-semeru-25-noble

  • 3.9.12-amazoncorretto-11, 3.9-amazoncorretto-11, 3-amazoncorretto-11

  • 3.9.12-amazoncorretto-11-al2023, 3.9-amazoncorretto-11-al2023, 3-amazoncorretto-11-al2023

  • 3.9.12-amazoncorretto-11-alpine, 3.9-amazoncorretto-11-alpine, 3-amazoncorretto-11-alpine

  • 3.9.12-amazoncorretto-11-debian, 3.9.12-amazoncorretto-11-debian-trixie, 3.9-amazoncorretto-11-debian, 3.9-amazoncorretto-11-debian-trixie, 3-amazoncorretto-11-debian, 3-amazoncorretto-11-debian-trixie

  • 3.9.12-amazoncorretto-17, 3.9-amazoncorretto-17, 3-amazoncorretto-17

  • 3.9.12-amazoncorretto-17-al2023, 3.9-amazoncorretto-17-al2023, 3-amazoncorretto-17-al2023

  • 4.0.0-rc-5-amazoncorretto-17-al2023

  • 3.9.12-amazoncorretto-17-alpine, 3.9-amazoncorretto-17-alpine, 3-amazoncorretto-17-alpine

  • 3.9.12-amazoncorretto-17-debian, 3.9.12-amazoncorretto-17-debian-trixie, 3.9-amazoncorretto-17-debian, 3.9-amazoncorretto-17-debian-trixie, 3-amazoncorretto-17-debian, 3-amazoncorretto-17-debian-trixie

  • 4.0.0-rc-5-amazoncorretto-17-debian, 4.0.0-rc-5-amazoncorretto-17-debian-trixie

  • 4.0.0-rc-5-amazoncorretto-17

  • 3.9.12-amazoncorretto-21, 3.9-amazoncorretto-21, 3-amazoncorretto-21

  • 3.9.12-amazoncorretto-21-al2023, 3.9-amazoncorretto-21-al2023, 3-amazoncorretto-21-al2023

  • 4.0.0-rc-5-amazoncorretto-21-al2023

  • 3.9.12-amazoncorretto-21-alpine, 3.9-amazoncorretto-21-alpine, 3-amazoncorretto-21-alpine

  • 3.9.12-amazoncorretto-21-debian, 3.9.12-amazoncorretto-21-debian-trixie, 3.9-amazoncorretto-21-debian, 3.9-amazoncorretto-21-debian-trixie, 3-amazoncorretto-21-debian, 3-amazoncorretto-21-debian-trixie

  • 4.0.0-rc-5-amazoncorretto-21-debian, 4.0.0-rc-5-amazoncorretto-21-debian-trixie

  • 4.0.0-rc-5-amazoncorretto-21

  • 3.9.12-amazoncorretto-25, 3.9.12-amazoncorretto, 3.9-amazoncorretto-25, 3.9-amazoncorretto, 3-amazoncorretto-25, 3-amazoncorretto, amazoncorretto

  • 3.9.12-amazoncorretto-25-al2023, 3.9-amazoncorretto-25-al2023, 3-amazoncorretto-25-al2023

  • 4.0.0-rc-5-amazoncorretto-25-al2023

  • 3.9.12-amazoncorretto-25-alpine, 3.9-amazoncorretto-25-alpine, 3-amazoncorretto-25-alpine

  • 3.9.12-amazoncorretto-25-debian, 3.9.12-amazoncorretto-25-debian-trixie, 3.9-amazoncorretto-25-debian, 3.9-amazoncorretto-25-debian-trixie, 3-amazoncorretto-25-debian, 3-amazoncorretto-25-debian-trixie

  • 4.0.0-rc-5-amazoncorretto-25-debian, 4.0.0-rc-5-amazoncorretto-25-debian-trixie

  • 4.0.0-rc-5-amazoncorretto-25, 4.0.0-rc-5-amazoncorretto

  • 3.9.12-amazoncorretto-8, 3.9-amazoncorretto-8, 3-amazoncorretto-8

  • 3.9.12-amazoncorretto-8-al2023, 3.9-amazoncorretto-8-al2023, 3-amazoncorretto-8-al2023

  • 3.9.12-amazoncorretto-8-alpine, 3.9-amazoncorretto-8-alpine, 3-amazoncorretto-8-alpine

  • 3.9.12-amazoncorretto-8-debian, 3.9.12-amazoncorretto-8-debian-trixie, 3.9-amazoncorretto-8-debian, 3.9-amazoncorretto-8-debian-trixie, 3-amazoncorretto-8-debian, 3-amazoncorretto-8-debian-trixie

  • 3.9.12-sapmachine-11, 3.9-sapmachine-11, 3-sapmachine-11

  • 3.9.12-sapmachine-17, 3.9-sapmachine-17, 3-sapmachine-17

  • 4.0.0-rc-5-sapmachine-17

  • 3.9.12-sapmachine-21, 3.9-sapmachine-21, 3-sapmachine-21

  • 4.0.0-rc-5-sapmachine-21

  • 3.9.12-sapmachine-25, 3.9.12-sapmachine, 3.9-sapmachine-25, 3.9-sapmachine, 3-sapmachine-25, 3-sapmachine, sapmachine

  • 4.0.0-rc-5-sapmachine-25, 4.0.0-rc-5-sapmachine

Quick reference (cont.)

  • Where to file issues:
    [***]

  • Supported architectures: (more info)
    amd64, arm32v7, arm64v8, ppc64le, riscv64, s390x

  • Published image artifact details:
    repo-info repo's repos/maven/ directory (history)
    (image metadata, transfer size, etc)

  • Image updates:
    official-images repo's library/maven label
    official-images repo's library/maven file (history)

  • Source of this description:
    docs repo's maven/ directory (history)

What is Maven?

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

!logo

How to use this image

You can run a Maven project by using the Maven Docker image directly, passing a Maven command to docker run:

console
$ docker run -it --rm --name my-maven-project -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.3-jdk-8 mvn clean install

Building local Docker image (optional)

This is a base image that you can extend, so it has the bare minimum packages needed. If you add custom package(s) to the Dockerfile, then you can build your local Docker image like this:

console
$ docker build --tag my_local_maven:3.5.2-jdk-8 .

Reusing the Maven local repository

The local Maven repository can be reused across containers by creating a volume and mounting it in /root/.m2.

console
$ docker volume create --name maven-repo
$ docker run -it -v maven-repo:/root/.m2 maven mvn archetype:generate # will download artifacts
$ docker run -it -v maven-repo:/root/.m2 maven mvn archetype:generate # will reuse downloaded artifacts

Or you can just use your home .m2 cache directory that you share e.g. with your Eclipse/IDEA:

console
$ docker run -it --rm -v "$PWD":/usr/src/mymaven -v "$HOME/.m2":/root/.m2 -v "$PWD/target:/usr/src/mymaven/target" -w /usr/src/mymaven maven mvn clean package  

Packaging a local repository with the image

The $MAVEN_CONFIG dir (default to /root/.m2) could be configured as a volume so anything copied there in a Dockerfile at build time is lost. For that reason the dir /usr/share/maven/ref/ exists, and anything in that directory will be copied on container startup to $MAVEN_CONFIG.

To create a pre-packaged repository, create a pom.xml with the dependencies you need and use this in your Dockerfile. /usr/share/maven/ref/settings-docker.xml is a settings file that changes the local repository to /usr/share/maven/ref/repository, but you can use your own settings file as long as it uses /usr/share/maven/ref/repository as local repo.

dockerfile
COPY pom.xml /tmp/pom.xml
RUN mvn -B -f /tmp/pom.xml -s /usr/share/maven/ref/settings-docker.xml dependency:resolve

To add your custom settings.xml file to the image use

dockerfile
COPY settings.xml /usr/share/maven/ref/

For an example, check the tests dir

Running as non-root

Maven needs the user home to download artifacts to, and if the user does not exist in the image an extra user.home Java property needs to be set.

For example, to run as user 1000 mounting the host' Maven repo

console
$ docker run -v ~/.m2:/var/maven/.m2 -ti --rm -u 1000 -e MAVEN_CONFIG=/var/maven/.m2 maven mvn -Duser.home=/var/maven archetype:generate

Image Variants

The maven images come in many flavors, each designed for a specific use case.

maven:<version>

This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.

Some of these tags may have names like trixie in them. These are the suite code names for releases of Debian and indicate which release the image is based on. If your image needs to install any additional packages beyond what comes with the image, you'll likely want to specify one of these explicitly to minimize breakage when there are new releases of Debian.

Some of these tags may have names like noble in them. These are the suite code names for releases of Ubuntu and indicate which release the image is based on. If your image needs to install any additional packages beyond what comes with the image, you'll likely want to specify one of these explicitly to minimize breakage when there are new releases of Ubuntu.

maven:<version>-alpine

This image is based on the popular Alpine Linux project, available in the alpine official image. Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.

This variant is useful when final image size being as small as possible is your primary concern. The main caveat to note is that it does use musl libc instead of glibc and friends, so software will often run into issues depending on the depth of their libc requirements/assumptions. See this Hacker News comment thread for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.

To minimize image size, it's uncommon for additional related tools (such as git or bash) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the alpine image description for examples of how to install packages if you are unfamiliar).

License

View license information for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's maven/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Deployment & Usage Documentation

MAVEN Docker 容器化部署指南

Apache Maven(简称MAVEN)是一款由Apache软件基金会开发的项目管理和构建自动化工具。基于项目对象模型(POM)的概念,MAVEN能够从中央信息源管理项目的构建、报告和文档生成过程。其核心功能包括依赖管理、项目构建生命周期管理、插件体系扩展等,广泛应用于Java项目开发中,同时也支持C#、Ruby、Scala等多种编程语言的项目管理。

Read More
查看更多 maven 相关镜像 →
okteto/maven logo
okteto/maven
by Okteto
认证
用于Okteto CLI的Java Maven开发环境镜像,Okteto是面向开发者的Kubernetes工具。
100K+ pulls
上次更新:9 天前
chainguard/maven logo
chainguard/maven
by Chainguard, Inc.
认证
使用Chainguard的低至零CVE容器镜像构建、交付和运行安全软件。
10K+ pulls
上次更新:6 天前
atlassian/maven logo
atlassian/maven
by Atlassian
认证
在预创建的非root用户下运行的Apache Maven
66.1K pulls
上次更新:6 年前
paketobuildpacks/maven logo
paketobuildpacks/maven
by Linux Foundation
暂无描述
100K+ pulls
上次更新:24 天前
jelastic/maven logo
jelastic/maven
by jelastic
Jelastic PaaS维护的Maven构建节点镜像,具备负载资源优化、Java项目构建/部署自动化及定期安全更新功能。
10M+ pulls
上次更新:25 天前
amd64/maven logo
amd64/maven
by amd64
Apache Maven是一款软件项目管理和理解工具,基于项目对象模型(POM),可从中央信息管理项目的构建、报告和文档。
1M+ pulls
上次更新:12 天前

轩辕镜像配置手册

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

登录仓库拉取

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

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

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

镜像拉取常见问题

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

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

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

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

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

oldzhang的头像

oldzhang

运维工程师

Linux服务器

5

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

轩辕镜像
镜像详情
...
library/maven
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
提交工单
免费获取在线技术支持请 提交工单,官方QQ群:13763429 。
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
免费获取在线技术支持请提交工单,官方QQ群: 。
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.
轩辕镜像 官方专业版 Logo
轩辕镜像轩辕镜像官方专业版
首页个人中心搜索镜像
交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 13763429