mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 15:28:41 +00:00
69912ba9b3
* feat(install, svn): remove svn Remove everything related to svn. Rename uoj-svn-lib to uoj-data-lib. Save preparing problem data to /var/uoj_data/prepare/problem_id. * Typo: uoj_date -> uoj_data * add: backward compatibility BREAKING CHANGE: Preparing problem data location is changed You need to move files from /var/svn/problem/{id}/cur/{id}/1 to /var/uoj_data/upload/{id}
25 lines
844 B
Docker
25 lines
844 B
Docker
FROM ubuntu:18.04
|
|
MAINTAINER MascoSkray <MascoSkray@gmail.com>
|
|
ARG CLONE_ADDFLAG
|
|
|
|
#Update apt and install git
|
|
RUN apt-get update && apt-get install -y git
|
|
#Clone the latest UOJ Community verison to local
|
|
RUN cd ~ && git clone https://github.com/UniversalOJ/UOJ-System.git --depth 1 --single-branch ${CLONE_ADDFLAG}
|
|
#Install environment and set startup script
|
|
RUN cd ~/UOJ-System/install/bundle && sh install.sh -p && echo "\
|
|
#!/bin/sh\n\
|
|
chown -R mysql:mysql /var/lib/mysql /var/run/mysqld\n\
|
|
if [ ! -f \"/var/svn/.UOJSetupDone\" ]; then\n\
|
|
cd ~/UOJ-System/install/bundle && sh install.sh -i\n\
|
|
fi\n\
|
|
service ntp start\n\
|
|
service mysql start\n\
|
|
service apache2 start\n\
|
|
su local_main_judger -c \"~/judge_client/judge_client start\"\n\
|
|
exec bash\n" >/root/up && chmod +x /root/up
|
|
|
|
ENV LANG=C.UTF-8 TZ=Asia/Shanghai
|
|
EXPOSE 80 3690
|
|
CMD /root/up
|