40 lines
1.4 KiB
Docker
40 lines
1.4 KiB
Docker
# Base Kotlin 1.9.2x image
|
|
# Written by Wyatt J. Miller, 2024
|
|
# This image is opinionated, but you're welcome to customize as much as you like
|
|
|
|
# Get my custom base image from scm
|
|
FROM scm.wyattjmiller.com/wymiller/base_container:latest
|
|
|
|
# Label it right, ya know?
|
|
ENV NAME=custom_base_kotlin_image VERSION=1.1
|
|
LABEL com.github.containers.toolbox="true" \
|
|
com.redhat.component="$NAME" \
|
|
name="$NAME" \
|
|
version="$VERSION" \
|
|
usage="Wyatt's base Kotlin image" \
|
|
summary="Wyatt's custom base Kotlin image" \
|
|
maintainer="Wyatt J. Miller <wyatt@wyattjmiller.com>" \
|
|
vendor="Miller Web Solutions"
|
|
|
|
# Set environment variables
|
|
ENV KOTLIN_VERSION=1.9.23
|
|
ENV KOTLIN_HOME=/usr/local/kotlin
|
|
ENV GRADLE_VERSION=8.6
|
|
ENV GRADLE_HOME=/opt/gradle
|
|
|
|
# Install required packages
|
|
RUN dnf install -y -q wget unzip java-17-openjdk java-17-openjdk-devel && \
|
|
dnf clean all
|
|
|
|
# Download and install Kotlin
|
|
RUN wget -q "https://github.com/JetBrains/kotlin/releases/download/v${KOTLIN_VERSION}/kotlin-compiler-${KOTLIN_VERSION}.zip" -O kotlin.zip && \
|
|
unzip -q kotlin.zip -d /usr/local && \
|
|
mv /usr/local/kotlinc /usr/local/kotlin && \
|
|
rm kotlin.zip
|
|
|
|
# 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
|