From 55f25645e7e57308f343fc928a75a01a3edbbec0 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 26 Nov 2022 17:13:14 +0100 Subject: [PATCH] fix adding nsjail based on arg --- Dockerfile | 6 +++--- backend/windmill-worker/src/worker.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30bfb5d17c..5e5ab433f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /nsjail ARG nsjail="" -RUN if [[ "$nsjail" == "true" ]]; then apt-get -y update \ +RUN if [ "$nsjail" = "true" ]; then apt-get -y update \ && apt-get install -y \ bison=2:3.3.* \ flex=2.6.* \ @@ -18,9 +18,9 @@ RUN if [[ "$nsjail" == "true" ]]; then apt-get -y update \ protobuf-compiler=3.6.*; fi -RUN if [[ "$nsjail" == "true" ]]; then git clone -b master --single-branch https://github.com/google/nsjail.git . \ +RUN if [ "$nsjail" = "true" ]; then git clone -b master --single-branch https://github.com/google/nsjail.git . \ && git checkout dccf911fd2659e7b08ce9507c25b2b38ec2c5800; fi -RUN if [[ "$nsjail" == "true" ]]; then make; else touch nsjail; fi +RUN if [ "$nsjail" = "true" ]; then make; else touch nsjail; fi FROM rust:slim-buster AS rust_base diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index 62f701ef97..76e90c4728 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -1017,7 +1017,7 @@ async fn handle_code_execution_job( r#" mount {{ src: "{worker_dir}/{}/shared" - dst: "/shared" + dst: "/tmp/shared" is_bind: true rw: true }} @@ -1029,7 +1029,7 @@ mount {{ } else { r#" mount { - dst: "/shared" + dst: "/tmp/shared" fstype: "tmpfs" rw: true options: "size=500000000"