forked from lablup/backend.ai-kernels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.8-alpine
33 lines (27 loc) · 1.25 KB
/
Dockerfile.8-alpine
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
FROM lablup/kernel-base-python-minimal:3.6-alpine
# Install Java compile environments
# ref: https://github.com/docker-library/openjdk/blob/master/8-jdk/alpine/Dockerfile
# You may need to check the Alpine package repository for latest OpenJDK package available.
# ref: https://pkgs.alpinelinux.org/packages?name=openjdk8&branch=v3.6&repo=&arch=x86_64
ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin
ENV JAVA_VERSION 8u131
ENV JAVA_ALPINE_VERSION 8.131.11-r2
RUN { \
echo '#!/bin/sh'; \
echo 'set -e'; \
echo; \
echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \
} > /usr/local/bin/docker-java-home \
&& chmod +x /usr/local/bin/docker-java-home
RUN set -x \
&& apk add --no-cache \
openjdk8="$JAVA_ALPINE_VERSION" \
&& [ "$JAVA_HOME" = "$(docker-java-home)" ]
# Install kernel-runner scripts package
RUN pip install --no-cache-dir "backend.ai-kernel-runner[java]~=1.0.2"
COPY policy.yml /home/sorna/policy.yml
LABEL io.sorna.features "batch query uid-match"
CMD ["/home/sorna/jail", "-policy", "/home/sorna/policy.yml", \
"/usr/local/bin/python", "-m", "ai.backend.kernel", "java"]
# vim: ft=dockerfile