JudgeServer/Dockerfile

22 lines
1.1 KiB
Docker
Raw Normal View History

2017-11-25 11:43:26 +00:00
FROM registry.docker-cn.com/library/ubuntu:16.04
2017-11-25 11:43:26 +00:00
COPY build/java_policy /etc
2018-03-18 00:19:44 +00:00
RUN buildDeps='software-properties-common git libtool cmake python-dev python3-pip python-pip libseccomp-dev' && \
apt-get update && apt-get install -y python python3.5 python-pkg-resources python3-pkg-resources gcc g++ $buildDeps && \
add-apt-repository ppa:openjdk-r/ppa && apt-get update && apt-get install -y openjdk-8-jdk && \
2018-03-18 00:19:44 +00:00
pip3 install --no-cache-dir psutil gunicorn flask requests && \
2018-12-12 06:38:29 +00:00
cd /tmp && git clone -b newnew --depth 1 https://github.com/QingdaoU/Judger && cd Judger && \
2018-03-18 00:19:44 +00:00
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/* && \
2018-10-14 13:50:20 +00:00
mkdir -p /code && \
useradd -u 12001 compiler && useradd -u 12002 code && useradd -u 12003 spj && usermod -a -G code spj
2018-03-18 00:19:44 +00:00
HEALTHCHECK --interval=5s --retries=3 CMD python3 /code/service.py
2017-11-25 11:43:26 +00:00
ADD server /code
2016-10-03 09:30:58 +00:00
WORKDIR /code
2018-12-12 06:38:29 +00:00
RUN gcc -shared -fPIC -o unbuffer.so unbuffer.c
2016-10-03 09:30:58 +00:00
EXPOSE 8080
2017-12-22 06:02:37 +00:00
ENTRYPOINT /code/entrypoint.sh