-
Notifications
You must be signed in to change notification settings - Fork 126
/
Copy pathDockerfile
36 lines (30 loc) · 884 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
27
28
29
30
31
32
33
34
35
36
FROM alpine:latest
MAINTAINER go.kscripting@gmail.com
ARG KSCRIPT_VERSION=4.1.1
ARG KOTLIN_VERSION=1.7.21
RUN \
# Install bash & Java \
apk add bash openjdk11 && \
\
# 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
ENTRYPOINT KOTLIN_HOME=/opt/kotlinc \
PATH=/opt/kotlinc/bin:$PATH \
kscript "$0" "$@"
CMD [ "--help" ]