maven

s390x/maven Docker Image

Apache Maven是软件项目管理与综合工具,用于简化项目构建、依赖管理及流程标准化,提升开发效率。

1 次收藏下载次数: 0状态:社区镜像维护者:s390x仓库类型:镜像最近更新:11 天前
下载命令
点击查看

Note: this is the "per-architecture" repository for the s390x builds of https://hub.docker.com/_/maven -- for more information, see https://github.com/docker-library/official-images#architectures-other-than-amd64 and https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what.

Quick reference

  • Maintained by:
    https://github.com/carlossg/docker-maven

  • Where to get help:
    https://dockr.ly/comm-slack, Server Fault, https://unix.stackexchange.com/help/on-topic, or https://stackoverflow.com/help/on-topic

Supported tags and respective Dockerfile links

  • https://github.com/carlossg/docker-maven/blob/4bcc1dea6507fba8ec40c602bf1bfdb963e21288/eclipse-temurin-11-noble/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/4bcc1dea6507fba8ec40c602bf1bfdb963e21288/eclipse-temurin-11-resolute/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/8ef234bed02d88f4edcc***f567db1362a76/eclipse-temurin-17-noble/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/8ef234bed02d88f4edcc***f567db1362a76/eclipse-temurin-17-noble-maven-4/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/8ef234bed02d88f4edcc***f567db1362a76/eclipse-temurin-17-resolute/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/8ef234bed02d88f4edcc***f567db1362a76/eclipse-temurin-17-resolute-maven-4/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/4bcc1dea6507fba8ec40c602bf1bfdb963e21288/eclipse-temurin-21-noble/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/4bcc1dea6507fba8ec40c602bf1bfdb963e21288/eclipse-temurin-21-noble-maven-4/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/4bcc1dea6507fba8ec40c602bf1bfdb963e21288/eclipse-temurin-21-resolute/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/4bcc1dea6507fba8ec40c602bf1bfdb963e21288/eclipse-temurin-21-resolute-maven-4/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/4bcc1dea6507fba8ec40c602bf1bfdb963e21288/eclipse-temurin-25-noble/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/4bcc1dea6507fba8ec40c602bf1bfdb963e21288/eclipse-temurin-25-noble-maven-4/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/4bcc1dea6507fba8ec40c602bf1bfdb963e21288/eclipse-temurin-25-resolute/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/4bcc1dea6507fba8ec40c602bf1bfdb963e21288/eclipse-temurin-25-resolute-maven-4/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/e24ced7068df551af172a630f329595db574b6e4/eclipse-temurin-27-resolute/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/e24ced7068df551af172a630f329595db574b6e4/eclipse-temurin-27-resolute-maven-4/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/6b179e3a37bb4aa699e11d9dbb2431fcc55030fd/ibmjava-8/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/6b179e3a37bb4aa699e11d9dbb2431fcc55030fd/ibm-semeru-11-noble/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/6b179e3a37bb4aa699e11d9dbb2431fcc55030fd/ibm-semeru-17-noble/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/1a4d2d539bac81f9b137e3fa115cb4642b500087/ibm-semeru-17-noble-maven-4/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/6b179e3a37bb4aa699e11d9dbb2431fcc55030fd/ibm-semeru-21-noble/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/1a4d2d539bac81f9b137e3fa115cb4642b500087/ibm-semeru-21-noble-maven-4/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/6b179e3a37bb4aa699e11d9dbb2431fcc55030fd/ibm-semeru-25-noble/Dockerfile

  • https://github.com/carlossg/docker-maven/blob/1a4d2d539bac81f9b137e3fa115cb4642b500087/ibm-semeru-25-noble-maven-4/Dockerfile

Quick reference (cont.)

  • Where to file issues:
    https://github.com/carlossg/docker-maven/issues?q=is:issue+is:pr

  • Supported architectures: (https://github.com/docker-library/official-images#architectures-other-than-amd64)
    https://hub.docker.com/r/amd64/maven/, https://hub.docker.com/r/arm32v7/maven/, https://hub.docker.com/r/arm64v8/maven/, https://hub.docker.com/r/ppc64le/maven/, https://hub.docker.com/r/riscv64/maven/, https://hub.docker.com/r/s390x/maven/

  • Published image artifact details:
    https://github.com/docker-library/repo-info/blob/master/repos/maven (https://github.com/docker-library/repo-info/commits/master/repos/maven)
    (image metadata, transfer size, etc)

  • Image updates:
    https://github.com/docker-library/official-images/issues?q=label%3Alibrary%2Fmaven
    https://github.com/docker-library/official-images/blob/master/library/maven (https://github.com/docker-library/official-images/commits/master/library/maven)

  • Source of this description:
    https://github.com/docker-library/docs/tree/master/maven (https://github.com/docker-library/docs/commits/master/maven)

What is Maven?

http://maven.apache.org 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.

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 s390x/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_s390x/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 s390x/maven mvn archetype:generate # will download artifacts
$ docker run -it -v maven-repo:/root/.m2 s390x/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 s390x/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 s390x/maven mvn -Duser.home=/var/maven archetype:generate

License

View https://www.apache.org/licenses/ 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 https://github.com/docker-library/repo-info/tree/master/repos/maven.

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.

镜像拉取方式

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

轩辕镜像加速拉取命令点我查看更多 maven 镜像标签

docker pull docker.xuanyuan.run/s390x/maven:<标签>

DockerHub 原生拉取命令

docker pull s390x/maven:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告