2017-11-25 11:43:26 +00:00
|
|
|
FROM registry.docker-cn.com/library/ubuntu:16.04
|
2017-10-31 11:51:42 +00:00
|
|
|
|
2017-11-25 11:43:26 +00:00
|
|
|
COPY build/java_policy /etc
|
2017-10-31 11:51:42 +00:00
|
|
|
|
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 && \
|
2018-03-23 10:32:54 +00:00
|
|
|
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 && \
|
2017-10-31 11:51:42 +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 && \
|
2017-10-31 11:51:42 +00:00
|
|
|
apt-get purge -y --auto-remove $buildDeps && \
|
2018-05-05 06:59:20 +00:00
|
|
|
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
|
2017-10-31 11:51:42 +00:00
|
|
|
|
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
|
|
|
|
EXPOSE 8080
|
2017-12-22 06:02:37 +00:00
|
|
|
ENTRYPOINT /code/entrypoint.sh
|