-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
25 lines (20 loc) · 971 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM docker.io/fedora:40
LABEL \
org.opencontainers.image.title="java-maven" \
org.opencontainers.image.description="Fedora based Java image with Maven" \
org.opencontainers.image.source="https://github.com/jhnc-oss/images" \
org.opencontainers.image.documentation="https://github.com/jhnc-oss/images" \
org.opencontainers.image.vendor="jhnc-oss" \
org.opencontainers.image.licenses="MIT"
ARG JAVA_VERSION
RUN dnf update -y && \
dnf install -y java-"${JAVA_VERSION}"-openjdk-devel git && \
MAVEN_VERSION="3.9.9" && \
curl --silent -o maven.tar.gz --output-dir /tmp \
"https://archive.apache.org/dist/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz" && \
mkdir /opt/maven && \
tar xf /tmp/maven.tar.gz -C /opt/maven --strip-components=1 && \
rm -rf /tmp/* && \
dnf clean all && \
rm -rf /var/cache/dnf
ENV PATH=/opt/maven/bin:${PATH}