riscv64/maven
Apache Maven is a software project management and comprehension tool.
779
Note: this is the "per-architecture" repository for the riscv64
builds of the maven
official image -- for more information, see "Architectures other than amd64?" in the official images documentation and "An image's source changed in Git, now what?" in the official images FAQ.
Maintained by:
Carlos Sanchez
Where to get help:
the Docker Community Slack, Server Fault, Unix & Linux, or Stack Overflow
Dockerfile
links3.9.9-eclipse-temurin-17
, 3.9-eclipse-temurin-17
, 3-eclipse-temurin-17
3.9.9-eclipse-temurin-23
, 3.9-eclipse-temurin-23
, 3-eclipse-temurin-23
3.9.9-eclipse-temurin-23-noble
, 3.9-eclipse-temurin-23-noble
, 3-eclipse-temurin-23-noble
Where to file issues:
https://github.com/carlossg/docker-maven/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)
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.
You can run a Maven project by using the Maven Docker image directly, passing a Maven command to docker run
:
$ docker run -it --rm --name my-maven-project -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven riscv64/maven:3.3-jdk-8 mvn clean install
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:
$ docker build --tag my_local_riscv64/maven:3.5.2-jdk-8 .
The local Maven repository can be reused across containers by creating a volume and mounting it in /root/.m2
.
$ docker volume create --name maven-repo
$ docker run -it -v maven-repo:/root/.m2 riscv64/maven mvn archetype:generate # will download artifacts
$ docker run -it -v maven-repo:/root/.m2 riscv64/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:
$ 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 riscv64/maven mvn clean package
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.
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
COPY settings.xml /usr/share/maven/ref/
For an example, check the tests
dir
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
$ docker run -v ~/.m2:/var/maven/.m2 -ti --rm -u 1000 -e MAVEN_CONFIG=/var/maven/.m2 riscv64/maven mvn -Duser.home=/var/maven archetype:generate
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.
docker pull riscv64/maven