-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (16 loc) · 1014 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
FROM amazonlinux:2017.03.1.20170812
RUN yum install -y which curl-devel gcc
ENV JDK_9_VERSION=9.0.4
RUN curl -L https://download.java.net/java/GA/jdk9/${JDK_9_VERSION}/binaries/openjdk-${JDK_9_VERSION}_linux-x64_bin.tar.gz -o openjdk-${JDK_9_VERSION}_linux-x64_bin.tar.gz \
&& mkdir java && mkdir -p /usr/lib/jvm/openjdk-9 && tar -xzf openjdk-${JDK_9_VERSION}_linux-x64_bin.tar.gz --strip 1 --directory /java \
&& rm -rf openjdk-${JDK_9_VERSION}_linux-x64_bin.tar.gz && mv /java /usr/lib/jvm/openjdk-9
# Add /usr/local/lib to library path
RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/libc.conf && ldconfig
# Get cacerts from java 8
COPY --from=anapsix/alpine-java:8 /opt/jdk/jre/lib/security/cacerts /usr/lib/jvm/openjdk-9/java/lib/security/cacerts
ENV PATH="/kotlin-native/bin:/usr/lib/jvm/openjdk-9/java/bin:${PATH}"
RUN echo "JAVA_HOME=$(which java)" && export PATH JAVA_HOME && mkdir /build && mkdir /runtime
COPY . runtime
WORKDIR runtime
RUN ./gradlew build --no-daemon
ENTRYPOINT /bin/bash