-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
ARG BASE=eclipse-temurin:21-alpine | ||
ARG DISTRIBUTION=ubuntu | ||
ARG JAVA_VENDOR=eclipse-temurin | ||
ARG JAVA_VERSION=21 | ||
|
||
FROM $BASE | ||
FROM eclipse-temurin:${JAVA_VERSION} as ubuntu | ||
RUN apt-get update && \ | ||
apt-get install -y curl bash unzip | ||
|
||
ARG KOTLIN_VERSION=2.0.0 | ||
|
||
# Installs required dependencies | ||
FROM eclipse-temurin:${JAVA_VERSION}-alpine as alpine | ||
RUN apk add curl bash unzip | ||
|
||
FROM $DISTRIBUTION AS final | ||
|
||
# Installs Kotlin | ||
ARG KOTLIN_VERSION=2.0.0 | ||
RUN curl -Lf "https://github.com/JetBrains/kotlin/releases/download/v$KOTLIN_VERSION/kotlin-compiler-$KOTLIN_VERSION.zip" -o kotlin.zip && \ | ||
unzip -d /usr/local/ kotlin.zip && \ | ||
rm kotlin.zip && \ | ||
chmod -R +x /usr/local/kotlinc/bin/ && \ | ||
ln -s /usr/local/kotlinc/bin/kotlin /bin/kotlin && \ | ||
ln -s /usr/local/kotlinc/bin/kotlinc /bin/kotlinc | ||
|
||
ENV PATH=$PATH:/usr/local/kotlinc/bin/ | ||
|
||
ENTRYPOINT ["/bin/kotlin"] |