Skip to content

Commit

Permalink
chore: Bump maven to 3.9.9 && Add maven-daemon support.
Browse files Browse the repository at this point in the history
  • Loading branch information
andyhan committed Sep 13, 2024
1 parent 1dd5bf9 commit 24e29a4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:
# - release/*

env:
MAVEN_BINARY_URL: https://dlcdn.apache.org/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.tar.gz
MAVEN_VERSION: 3.9.9
MVND_VERSION: 1.0.2

jobs:

Expand Down Expand Up @@ -87,12 +88,13 @@ jobs:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
MANDREL_IMAGE=${{ env.MANDREL_FULL_IMAGE }}
MAVEN_BINARY_URL=${{ env.MAVEN_BINARY_URL }}
MAVEN_VERSION=${{ env.MAVEN_VERSION }}
MVND_VERSION=${{ env.MVND_VERSION }}
- name: Image digest
run: |
Expand Down
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@ ARG MANDREL_IMAGE=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21

FROM ${MANDREL_IMAGE}

ARG MAVEN_BINARY_URL=https://dlcdn.apache.org/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.tar.gz
ARG MAVEN_VERSION=3.9.9
ARG MVND_VERSION=1.0.2

USER root
ENV MAVEN_BINARY_URL=https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz
ENV MVND_BINARY_URL=https://downloads.apache.org/maven/mvnd/${MVND_VERSION}/maven-mvnd-${MVND_VERSION}-linux-amd64.tar.gz

ENV MAVEN_HOME=/opt/maven
ENV M2_HOME=/opt/maven
ENV PATH="${MAVEN_HOME}/bin:${PATH}"
ENV MVND_HOME=/opt/mvnd
ENV PATH="${MVND_HOME}/bin:${MAVEN_HOME}/bin:${PATH}"
ENV MAVEN_OPTS="-Xmx1024m -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8"

USER root

RUN microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install -y bash curl \
&& mkdir -p /opt/maven && curl -fL $MAVEN_BINARY_URL | tar zxv -C /opt/maven --strip-components=1 \
&& mkdir -p /opt/mvnd && curl -fL $MVND_BINARY_URL | tar zxv -C /opt/mvnd --strip-components=1 \
&& ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn \
&& ln -s ${MVND_HOME}/bin/mvnd /usr/bin/mvnd \
&& microdnf clean all && [ ! -d /var/cache/yum ] || rm -rf /var/cache/yum

ENTRYPOINT []
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Quarkus Native Builder Image

A docker builder image which contains quay.io/quarkus/ubi-quarkus-mandrel-builder-image:[jdk-17, jdk-21] + maven:3.9.7
A docker builder image which contains quay.io/quarkus/ubi-quarkus-mandrel-builder-image:[jdk-17, jdk-21] + maven:3.9.9


[Docker Image | Docker Hub](https://hub.docker.com/r/andyhan/quarkus-mandrel-maven)

0 comments on commit 24e29a4

Please sign in to comment.