dont switch users in dockerfile, use runuser instead

This commit is contained in:
Brian Seymour 2018-09-21 12:19:37 -05:00
parent 548e69d3f3
commit fce8babb89
2 changed files with 1 additions and 2 deletions

View File

@ -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 soft nofile 128' >> /etc/security/limits.conf
RUN echo 'runner hard nofile 128' >> /etc/security/limits.conf RUN echo 'runner hard nofile 128' >> /etc/security/limits.conf
USER runner
WORKDIR /tmp WORKDIR /tmp

View File

@ -62,6 +62,6 @@ docker run \
-v $dir/executors/cpp:/executor_cpp:ro \ -v $dir/executors/cpp:/executor_cpp:ro \
-v $dir/executors/go:/executor_go:ro \ -v $dir/executors/go:/executor_go:ro \
piston \ piston \
/$bin /$file $file 2>&1 runuser -l runner -c '/$bin /$file $file 2>&1'
rm -f /tmp/$file rm -f /tmp/$file