-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (21 loc) · 799 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
26
ARG BASE_IMAGE=amazoncorretto:21
FROM $BASE_IMAGE
ARG BASE_IMAGE
RUN if [ -z "${BASE_IMAGE##*alpine*}" ]; then \
apk add curl bash unzip; \
elif [ -z "${BASE_IMAGE##*amazon*}" ]; then \
yum install -y curl bash unzip; \
else \
apt-get update && \
apt-get install -y curl bash unzip; \
fi
# 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"]