From fce8babb8981b0e4fb6fff1d895b4783e1c28bd7 Mon Sep 17 00:00:00 2001 From: Brian Seymour Date: Fri, 21 Sep 2018 12:19:37 -0500 Subject: [PATCH] dont switch users in dockerfile, use runuser instead --- docker/Dockerfile | 1 - docker/execute | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 284be06..2ef67e2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,5 +16,4 @@ RUN echo 'runner hard nproc 16' >> /etc/security/limits.conf RUN echo 'runner soft nofile 128' >> /etc/security/limits.conf RUN echo 'runner hard nofile 128' >> /etc/security/limits.conf -USER runner WORKDIR /tmp diff --git a/docker/execute b/docker/execute index 43486c8..0353a56 100755 --- a/docker/execute +++ b/docker/execute @@ -62,6 +62,6 @@ docker run \ -v $dir/executors/cpp:/executor_cpp:ro \ -v $dir/executors/go:/executor_go:ro \ piston \ - /$bin /$file $file 2>&1 + runuser -l runner -c '/$bin /$file $file 2>&1' rm -f /tmp/$file