custom-containers/language-containers/java/Containerfile.java17

32 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-03-14 19:51:24 -05:00
# Java 17 development container image
# Written by Wyatt J. Miller, 2024
# This image is opinionated, but you're welcome to customize as much as you like
# Start with the Fedora 39 custom image
FROM scm.wyattjmiller.com/wymiller/base_container:latest
# Label it right, ya know?
ENV NAME=custom_java_17_base_image VERSION=1.0
LABEL com.github.containers.toolbox="true" \
com.redhat.component="$NAME" \
name="$NAME" \
version="$VERSION" \
usage="Java currrent custom developer images" \
summary="Wyatt's custom Java 17 image" \
maintainer="Wyatt J. Miller <wyatt@wyattjmiller.com>" \
2024-03-14 19:51:24 -05:00
vendor="Miller Web Solutions"
# Set environment variables
ENV GRADLE_VERSION=8.6
ENV GRADLE_HOME=/opt/gradle
ENV PATH="${PATH}:${GRADLE_HOME}/bin"
2024-03-14 19:51:24 -05:00
# Install Java 17
RUN dnf install java-17-openjdk java-17-openjdk-devel -y -q && dnf clean all
# Download and install Gradle
RUN wget -q "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" -O gradle.zip && \
unzip -q gradle.zip -d /opt && \
mv "/opt/gradle-${GRADLE_VERSION}" "${GRADLE_HOME}" && \
rm gradle.zip