increase execution time, lift cpu cap, updated docs
This commit is contained in:
parent
35ddde0106
commit
eec7ec26fa
|
@ -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 \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
gcc -o binary -x c $1
|
||||
timeout -s KILL 2 ./binary
|
||||
timeout -s KILL 3 ./binary
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
g++ -o binary -x c $1
|
||||
timeout -s KILL 2 ./binary
|
||||
timeout -s KILL 3 ./binary
|
||||
|
|
|
@ -6,4 +6,4 @@ go build $file
|
|||
|
||||
file=${file%%.*}
|
||||
|
||||
timeout -s KILL 2 ./$file
|
||||
timeout -s KILL 3 ./$file
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
timeout -s KILL 2 nodejs $*
|
||||
timeout -s KILL 3 nodejs $*
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
timeout -s KILL 2 python2 $*
|
||||
timeout -s KILL 3 python2 $*
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
timeout -s KILL 2 python3.6 $*
|
||||
timeout -s KILL 3 python3.6 $*
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
timeout -s KILL 2 ruby $*
|
||||
timeout -s KILL 3 ruby $*
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue