File tree Expand file tree Collapse file tree 10 files changed +15
-6
lines changed Expand file tree Collapse file tree 10 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
Original file line number Diff line number Diff line change 11FROM alpine:3.6
22
33RUN apk add --no-cache python2 bash
4+ COPY ./compile.sh /bin/compile.sh
45COPY ./run.sh /bin/run.sh
5- RUN chmod 777 /bin/run.sh
6+ RUN chmod 777 /bin/compile.sh; \
7+ chmod 777 /bin/run.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- python script.py 1> run.stdout 2> run.stderr
3+ python script.py < run.stdin 1> run.stdout 2> run.stderr
Original file line number Diff line number Diff line change 1+ World
Original file line number Diff line number Diff line change 1+ World
Original file line number Diff line number Diff line change 1- Hello World!
1+ Hello World
Original file line number Diff line number Diff line change 1- print "Hello World!"
1+ inp = raw_input ()
2+ print ("Hello " + inp )
Original file line number Diff line number Diff line change 1- print "Hello World!"
1+ inp = raw_input ()
2+ print ("Hello " + inp )
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ mkdir -p $RUNBOX
99
1010# Copy source to runbox
1111cp $DIR /script.py $RUNBOX /script.py
12+ cp $DIR /run.stdin $RUNBOX /run.stdin
1213
1314# Test Compile
1415docker run \
@@ -19,7 +20,7 @@ docker run \
1920 --read-only \
2021 -v " $RUNBOX " :/usr/src/runbox \
2122 -w /usr/src/runbox codingblocks/judge-worker-py2 \
22- bash -c " /bin/run.sh"
23+ bash -c " /bin/compile.sh && /bin/ run.sh"
2324
2425
2526# Delete runbox
You can’t perform that action at this time.
0 commit comments