From 3ffeaf139c831eb4b112bdf16b5776ede974dc17 Mon Sep 17 00:00:00 2001 From: Brian Seymour Date: Thu, 20 Sep 2018 21:36:21 -0500 Subject: [PATCH] language support --- docker/Dockerfile | 1 + docker/execute | 7 +++++-- docker/executors/go | 3 +++ docker/executors/node | 3 +++ docker/executors/ruby | 3 +++ 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 docker/executors/go create mode 100755 docker/executors/node create mode 100755 docker/executors/ruby diff --git a/docker/Dockerfile b/docker/Dockerfile index 478c60a..c8ad9d1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,3 +7,4 @@ RUN apt-get -y install python RUN apt-get -y install python3 RUN apt-get -y install ruby RUN apt-get -y install nodejs +RUN apt-get -y install golang diff --git a/docker/execute b/docker/execute index 204d677..04108ad 100755 --- a/docker/execute +++ b/docker/execute @@ -29,10 +29,10 @@ case "$lang" in bin=executor_python3 ;; "ruby") - bin=ruby + bin=executor_ruby ;; "javascript" | "js" | "node") - bin=nodejs + bin=executor_node ;; "c") bin=executor_c @@ -40,6 +40,9 @@ case "$lang" in "cpp" | "c++") bin=executor_cpp ;; +"go") + bin=executor_go + ;; *) echo "invalid language" exit diff --git a/docker/executors/go b/docker/executors/go new file mode 100755 index 0000000..6f6d4b8 --- /dev/null +++ b/docker/executors/go @@ -0,0 +1,3 @@ +#!/bin/sh + +go run $* diff --git a/docker/executors/node b/docker/executors/node new file mode 100755 index 0000000..027e7d7 --- /dev/null +++ b/docker/executors/node @@ -0,0 +1,3 @@ +#!/bin/sh + +nodejs $* diff --git a/docker/executors/ruby b/docker/executors/ruby new file mode 100755 index 0000000..ea4534b --- /dev/null +++ b/docker/executors/ruby @@ -0,0 +1,3 @@ +#!/bin/sh + +ruby $*