fix adding nsjail based on arg

This commit is contained in:
Ruben Fiszel
2022-11-26 17:13:14 +01:00
parent be8673b2e3
commit 55f25645e7
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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"