-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Rename "java" to "java8" * java8 kernel image now uses the Alpine Linux's openjdk package for faster builds * Removed no-longer necessary chmod commands in C/C++ kernels
- Loading branch information
Showing
10 changed files
with
96 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,11 @@ MAINTAINER DevOps "[email protected]" | |
# Install minimal C compile environments | ||
RUN apk add --no-cache gcc musl-dev | ||
|
||
# Install Python packages | ||
RUN pip install --no-cache-dir aiozmq | ||
|
||
COPY run.py /home/sorna/run.py | ||
COPY policy.yml /home/sorna/policy.yml | ||
COPY patch-libs.so /home/sorna/patch-libs.so | ||
COPY base_run.py /home/sorna/base_run.py | ||
#COPY patch-libs.so /home/sorna/patch-libs.so | ||
#COPY base_run.py /home/sorna/base_run.py | ||
|
||
LABEL io.sorna.features "batch query uid-match user-input" | ||
|
||
USER work | ||
CMD ["/home/sorna/sorna-jail", "-policy", "/home/sorna/policy.yml", "/usr/local/bin/python3", "/home/sorna/run.py"] | ||
CMD ["/home/sorna/jail", "-policy", "/home/sorna/policy.yml", "/usr/local/bin/python3", "/home/sorna/run.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
FROM lablup/kernel-base-python3-minimal:latest | ||
MAINTAINER DevOps "[email protected]" | ||
|
||
# Install Python packages | ||
RUN pip install --no-cache-dir aiozmq | ||
|
||
# Install minimal C++ compile environments | ||
RUN apk add --no-cache g++ | ||
RUN apk add --no-cache g++ libstdc++ | ||
|
||
COPY run.py /home/sorna/run.py | ||
COPY policy.yml /home/sorna/policy.yml | ||
|
||
LABEL io.sorna.features "batch query uid-match user-input" | ||
|
||
USER work | ||
CMD ["/home/sorna/jail", "python3", "/usr/local/bin/python3", "/home/sorna/run.py"] | ||
CMD ["/home/sorna/jail", "-policy", "/home/sorna/policy.yml", "/usr/local/bin/python3", "/home/sorna/run.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
whitelist_paths: | ||
OP_OPEN: ["*"] | ||
OP_ACCESS: ["*"] | ||
OP_EXEC: ["*"] | ||
OP_STAT: ["*"] | ||
OP_CHMOD: ["/home/work/*", "/tmp/*"] | ||
exec_allowance: -1 | ||
fork_allowance: -1 | ||
max_child_procs: 32 | ||
extra_envs: [] | ||
preserved_env_keys: [ | ||
"HOME", "PATH", "LANG", | ||
"USER", "SHELL", "TERM", | ||
"LD_LIBRARY_PATH", | ||
"LD_PRELOAD", | ||
] | ||
|
||
diff_to_default: true | ||
|
||
# Following syscalls are blindly allowed. | ||
# IMPORTANT: ptrace MUST NOT be included! | ||
allowed_syscalls: | ||
- "umask" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM lablup/kernel-base-python3-minimal:latest | ||
MAINTAINER DevOps "[email protected]" | ||
|
||
# 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)" ] | ||
|
||
COPY run.py /home/sorna/run.py | ||
COPY policy.yml /home/sorna/policy.yml | ||
|
||
LABEL io.sorna.features "batch query uid-match user-input" | ||
|
||
CMD ["/home/sorna/jail", "-policy", "/home/sorna/policy.yml", "/usr/local/bin/python3", "/home/sorna/run.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
whitelist_paths: | ||
OP_OPEN: ["*"] | ||
OP_ACCESS: ["*"] | ||
OP_EXEC: ["*"] | ||
OP_STAT: ["*"] | ||
OP_CHMOD: ["/home/work/*", "/tmp/*"] | ||
exec_allowance: -1 | ||
fork_allowance: -1 | ||
max_child_procs: 32 | ||
extra_envs: [] | ||
preserved_env_keys: [ | ||
"HOME", "PATH", "LANG", | ||
"USER", "SHELL", "TERM", | ||
"LD_LIBRARY_PATH", | ||
"LD_PRELOAD", | ||
] | ||
|
||
diff_to_default: true | ||
|
||
# Following syscalls are blindly allowed. | ||
# IMPORTANT: ptrace MUST NOT be included! | ||
allowed_syscalls: | ||
- "umask" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters