瀏覽代碼

upd; add k,julia,d

txlyre 1 年之前
父節點
當前提交
ce3141f40c
共有 8 個文件被更改,包括 30 次插入0 次删除
  1. 8 0
      buildall.sh
  2. 1 0
      langs/d/Dockerfile
  3. 3 0
      langs/d/run.sh
  4. 1 0
      langs/julia/Dockerfile
  5. 3 0
      langs/julia/Dockerfile.user
  6. 3 0
      langs/julia/run.sh
  7. 4 0
      langs/k/Dockerfile
  8. 7 0
      langs/k/run.sh

+ 8 - 0
buildall.sh

@@ -23,6 +23,12 @@ do
       continue
     fi
 
+    if [ -f "$dir/Dockerfile.user" ]; then
+      template_user="$(cat $dir/Dockerfile.user)"
+    else
+      template_user=""
+    fi
+
     template="$(cat $dir/Dockerfile)"
 
     echo "$START
@@ -34,6 +40,8 @@ RUN chmod 705 /usr/bin/run
 
 $END
 
+$template_user
+
 ENTRYPOINT [\"/usr/bin/run\"]" > Dockerfile
 
     podman build -t "$dir-runner" .

+ 1 - 0
langs/d/Dockerfile

@@ -0,0 +1 @@
+RUN apt-get install ldc -y

+ 3 - 0
langs/d/run.sh

@@ -0,0 +1,3 @@
+#!/usr/bin/bash
+
+ldc --run -

+ 1 - 0
langs/julia/Dockerfile

@@ -0,0 +1 @@
+RUN apt-get install wget -y

+ 3 - 0
langs/julia/Dockerfile.user

@@ -0,0 +1,3 @@
+RUN wget -c https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.2-linux-x86_64.tar.gz
+RUN tar -xf julia-1.10.2-linux-x86_64.tar.gz
+RUN mv julia-1.10.2 .julia

+ 3 - 0
langs/julia/run.sh

@@ -0,0 +1,3 @@
+#!/usr/bin/bash
+
+/home/user/.julia/bin/julia -

+ 4 - 0
langs/k/Dockerfile

@@ -0,0 +1,4 @@
+RUN apt-get install git gcc make -y
+RUN git clone https://codeberg.org/ngn/k/ && cd k && make && mv k /usr/bin/k && cd .. && rm -rf k
+RUN chmod +x /usr/bin/k
+RUN chmod 705 /usr/bin/k

+ 7 - 0
langs/k/run.sh

@@ -0,0 +1,7 @@
+#!/usr/bin/bash
+
+IN="$(mktemp --suffix .k)"
+
+cat > "$IN"
+
+k "$IN"