mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 18:48:41 +00:00
d413b746eb
Without bundle, now you can choose to download single container. For example, you can only download judger container to setup a new judger. Also, the web container now no db and judger containing, except local sandbox. You can use docker-compose to get every single container work together from now. Single DB this time uses the latest MySQL 8 version, so some preferences are different.
23 lines
725 B
Docker
23 lines
725 B
Docker
FROM ubuntu:18.04
|
|
MAINTAINER MascoSkray <MascoSkray@gmail.com>
|
|
ARG CLONE_ADDFLAG
|
|
|
|
WORKDIR /opt
|
|
#Update apt and install git
|
|
RUN apt-get update && apt-get install -y git
|
|
#Clone the latest UOJ Community verison to local
|
|
RUN git clone https://github.com/UniversalOJ/UOJ-System.git --depth 1 --single-branch ${CLONE_ADDFLAG} uoj
|
|
#Install environment and set startup script
|
|
RUN cd uoj/install/judger && sh install.sh -p && echo "\
|
|
#!/bin/sh\n\
|
|
if [ ! -f \"/opt/uoj/judger/.conf.json\" ]; then\n\
|
|
cd /opt/uoj/install/judger && sh install.sh -i\n\
|
|
fi\n\
|
|
service ntp start\n\
|
|
su judger -c \"/opt/uoj/judger/judge_client start\"\n\
|
|
exec bash\n" >/opt/up && chmod +x /opt/up
|
|
|
|
ENV LANG=C.UTF-8 TZ=Asia/Shanghai
|
|
EXPOSE 2333
|
|
CMD /opt/up
|