mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-29 17:16:20 +00:00
46aa7b7005
In the past, we make the bundle installation as two parts. Some of the steps such as compile judger is done at local. And, to make it work, the steps may in a wrong order. Now we make most of the steps working online automaticly, and if you start the container you don't need to wait for a long time to let it prepare. It will only reset passwords. There are also some works moved to another place in order to make the installation flow clearer and simpler. Using more threads to boost judge_client's make. Deleted some old things and doing something new. TODAY: **Merry Christmas!**
25 lines
820 B
Docker
25 lines
820 B
Docker
FROM ubuntu:18.04
|
|
MAINTAINER MascoSkray <MascoSkray@gmail.com>
|
|
|
|
#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
|
|
#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\
|
|
svnserve -d -r /var/svn\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
|