diff --git a/docker/execute b/docker/execute index 58eaf93..647dbfb 100755 --- a/docker/execute +++ b/docker/execute @@ -1,10 +1,5 @@ #!/usr/bin/env bash -#docker run --rm -it piston /usr/bin/python -V -#docker run --rm -it piston /usr/bin/python3 -V -#docker run --rm -it piston /usr/bin/ruby --version -#docker run --rm -it piston /usr/bin/nodejs --version - dir="$( cd "$( dirname "$0" )" && pwd )" if [ -z "$1" ]; then @@ -51,7 +46,6 @@ esac docker run \ -m 64m \ --network none \ - --cpus=".2" \ --rm \ --log-driver none \ -v $filepath:/$file:ro \ diff --git a/docker/executors/c b/docker/executors/c index befbf57..64e1558 100755 --- a/docker/executors/c +++ b/docker/executors/c @@ -1,4 +1,4 @@ #!/bin/sh gcc -o binary -x c $1 -timeout -s KILL 2 ./binary +timeout -s KILL 3 ./binary diff --git a/docker/executors/cpp b/docker/executors/cpp index 9ec0065..6097145 100755 --- a/docker/executors/cpp +++ b/docker/executors/cpp @@ -1,4 +1,4 @@ #!/bin/sh g++ -o binary -x c $1 -timeout -s KILL 2 ./binary +timeout -s KILL 3 ./binary diff --git a/docker/executors/go b/docker/executors/go index 861ed39..bfc21a0 100755 --- a/docker/executors/go +++ b/docker/executors/go @@ -6,4 +6,4 @@ go build $file file=${file%%.*} -timeout -s KILL 2 ./$file +timeout -s KILL 3 ./$file diff --git a/docker/executors/node b/docker/executors/node index 762ab75..d27663a 100755 --- a/docker/executors/node +++ b/docker/executors/node @@ -1,3 +1,3 @@ #!/bin/sh -timeout -s KILL 2 nodejs $* +timeout -s KILL 3 nodejs $* diff --git a/docker/executors/python2 b/docker/executors/python2 index a44fa8b..8d2076c 100755 --- a/docker/executors/python2 +++ b/docker/executors/python2 @@ -1,3 +1,3 @@ #!/bin/sh -timeout -s KILL 2 python2 $* +timeout -s KILL 3 python2 $* diff --git a/docker/executors/python3 b/docker/executors/python3 index a7fd360..021286a 100755 --- a/docker/executors/python3 +++ b/docker/executors/python3 @@ -1,3 +1,3 @@ #!/bin/sh -timeout -s KILL 2 python3.6 $* +timeout -s KILL 3 python3.6 $* diff --git a/docker/executors/ruby b/docker/executors/ruby index ef74d2d..3c006db 100755 --- a/docker/executors/ruby +++ b/docker/executors/ruby @@ -1,3 +1,3 @@ #!/bin/sh -timeout -s KILL 2 ruby $* +timeout -s KILL 3 ruby $* diff --git a/readme.md b/readme.md index 1b5cb38..52be84a 100644 --- a/readme.md +++ b/readme.md @@ -38,7 +38,9 @@ various privilege escalation, denial-of-service, and resource saturation threats #### Performance One thing that needs investigation is how to spawn containers faster. The Docker daemon is synchronous in its container spawning. This means the bottleneck for code execution is how fast containers can start. Environments -vary, but, in ours they start at a rate of no more than 1 per second. +vary, but, in ours they start at a rate of no more than 1 per second. One possibility is Docker in Docker where by +X number of containers stay running all the time and then requests are delivered to each in a round robin and spawn +new Piston containers. #### License Piston is licensed under the MIT license.