From c496fc4aae6fa857b0100a706e5fe68dfdc1b572 Mon Sep 17 00:00:00 2001 From: virusdefender Date: Sun, 14 Oct 2018 21:50:20 +0800 Subject: [PATCH] fix permission --- Dockerfile | 3 ++- server/entrypoint.sh | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9f7df40..112ebb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,8 @@ RUN buildDeps='software-properties-common git libtool cmake python-dev python3-p mkdir build && cd build && cmake .. && make && make install && cd ../bindings/Python && python3 setup.py install && \ apt-get purge -y --auto-remove $buildDeps && \ apt-get clean && rm -rf /var/lib/apt/lists/* && \ - mkdir -p /code + mkdir -p /code && \ + useradd -u 12001 compiler && useradd -u 12002 code && useradd -u 12003 spj && usermod -a -G code spj HEALTHCHECK --interval=5s --retries=3 CMD python3 /code/service.py ADD server /code diff --git a/server/entrypoint.sh b/server/entrypoint.sh index f027ac3..e31fb7d 100755 --- a/server/entrypoint.sh +++ b/server/entrypoint.sh @@ -1,9 +1,4 @@ #!/bin/bash -useradd -u 12001 compiler -useradd -u 12002 code -useradd -u 12003 spj -usermod -a -G code spj - rm -rf /judger/* mkdir -p /judger/run /judger/spj