2017-09-10 19:46:56 +00:00
|
|
|
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
|
2016-11-17 02:08:31 +00:00
|
|
|
EXPOSE 80 3690
|
|
|
|
CMD /root/up
|