mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 22:48:42 +00:00
19aac52bcd
There are too many files of the old installation script. Now this could be only three files. Add support for docker automated build, so we can get the latest build form docker hub every time. The script can automaticly search the latest jdk builds and get them. It is no need to download by yourself. Make some changes to .default-config.php to generate config file. This new installation script can also be used for traditional installation. Supports some situations that does not provide docker environment such as WSL or OpenVZ virtualization technology. Bump mysql-server into 5.6 which 5.5.57 has some 奥妙重重的 problems in docker container.
24 lines
761 B
Docker
24 lines
761 B
Docker
FROM ubuntu:14.04
|
|
MAINTAINER MascoSkray <MascoSkray@gmail.com>
|
|
|
|
#Update apt and install git
|
|
RUN apt-get update -y && apt-get install -y git
|
|
#Clone the latest UOJ Community verison to local
|
|
RUN cd ~ && git clone https://github.com/UniversalOJ/UOJ-System.git
|
|
#Install environment and set startup script
|
|
RUN cd ~/UOJ-System/install/bundle && bash install.sh -e && echo "\
|
|
#!/bin/bash\n\
|
|
if [ ! -f "/var/svn/.UOJSetupDone" ]; then\n\
|
|
cd ~/UOJ-System/install/bundle && bash install.sh -c\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
|