-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (29 loc) · 868 Bytes
/
Dockerfile
File metadata and controls
36 lines (29 loc) · 868 Bytes
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
27
28
29
30
31
32
33
34
35
36
FROM gradle:jdk21-alpine
MAINTAINER go.kscripting@gmail.com
ARG KSCRIPT_VERSION=4.2.3
ARG KOTLIN_VERSION=1.9.24
RUN \
# Install bash \
apk add bash && \
# Create temp dir
cd $(mktemp -d) && \
\
# Install kscript \
wget https://github.com/holgerbrandl/kscript/releases/download/v${KSCRIPT_VERSION}/kscript-${KSCRIPT_VERSION}-bin.zip -q -O - | \
unzip - && \
mv kscript-${KSCRIPT_VERSION}/bin/* /usr/local/bin && \
chmod a+x /usr/local/bin/kscript && \
\
# Install Kotlin
wget https://github.com/JetBrains/kotlin/releases/download/v${KOTLIN_VERSION}/kotlin-compiler-${KOTLIN_VERSION}.zip -q -O - | \
unzip - && \
chmod a+x kotlinc/bin/kotlin kotlinc/bin/kotlinc && \
mv kotlinc /opt && \
\
# Done
rm -rf $PWD
WORKDIR /w
ENV KOTLIN_HOME=/opt/kotlinc
ENV PATH=/opt/kotlinc/bin:$PATH
ENTRYPOINT kscript "$0" "$@"
CMD [ "--help" ]